[llvm-commits] [llvm] r115640 - /llvm/trunk/test/Scripts/coff-dump.py
Michael J. Spencer
bigcheesegs at gmail.com
Tue Oct 5 10:56:46 PDT 2010
Author: mspencer
Date: Tue Oct 5 12:56:46 2010
New Revision: 115640
URL: http://llvm.org/viewvc/llvm-project?rev=115640&view=rev
Log:
test/coff-dump: Support reading from stdin.
Modified:
llvm/trunk/test/Scripts/coff-dump.py
Modified: llvm/trunk/test/Scripts/coff-dump.py
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Scripts/coff-dump.py?rev=115640&r1=115639&r2=115640&view=diff
==============================================================================
--- llvm/trunk/test/Scripts/coff-dump.py (original)
+++ llvm/trunk/test/Scripts/coff-dump.py Tue Oct 5 12:56:46 2010
@@ -560,7 +560,12 @@
return handlers[entry[0]](entry)
-Input = open (sys.argv[1], "rb")
+if len(sys.argv) <= 1 or sys.argv[1] == '-':
+ import StringIO
+ Input = StringIO.StringIO(sys.stdin.read())
+else:
+ Input = open (sys.argv[1], "rb")
+
try:
handle_element(file)
finally:
More information about the llvm-commits
mailing list