test/coff-dump: Support reading from stdin.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115640 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Michael J. Spencer 2010-10-05 17:56:46 +00:00
parent cc1f91c833
commit 3ef2c9f6d7

View File

@ -560,7 +560,12 @@ def handle_element(entry):
return handlers[entry[0]](entry)
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: