blob: 8a6bbe2abdc9cf4e8bf26d211b8bb04c6b3129af [file] [log] [blame]
Chris Lattnerad9a1762009-07-06 22:24:16 +00001#!/usr/bin/env python
Daniel Dunbarb3a69012009-06-26 16:47:03 +00002
3#===- make/filter-inputs ---------------------------------------------------===#
4#
5# The LLVM Compiler Infrastructure
6#
7# This file is distributed under the University of Illinois Open Source
8# License. See LICENSE.TXT for details.
9#
10#===------------------------------------------------------------------------===#
11
12# Given a list of files, return a new list of files taking only the
13# first file for any particular filename.
14def main():
15 import os,sys
16
17 seen = set()
18 for file in sys.argv[1:]:
19 base = os.path.basename(file)
20 if base not in seen:
21 seen.add(base)
22 print file
23
24if __name__ == '__main__':
25 main()