blob: 8a6bbe2abdc9cf4e8bf26d211b8bb04c6b3129af [file] [log] [blame]
#!/usr/bin/env python
#===- make/filter-inputs ---------------------------------------------------===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===------------------------------------------------------------------------===#
# Given a list of files, return a new list of files taking only the
# first file for any particular filename.
def main():
import os,sys
seen = set()
for file in sys.argv[1:]:
base = os.path.basename(file)
if base not in seen:
seen.add(base)
print file
if __name__ == '__main__':
main()