summaryrefslogtreecommitdiff
path: root/tools/llvm-dis
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-04-22 06:35:20 +0000
committerChris Lattner <sabre@nondot.org>2007-04-22 06:35:20 +0000
commit197cceaaac8e19b7005d716aade33d1a8ac70214 (patch)
tree369d9d8efc3c1f1d6892540b4031c57cd59821f7 /tools/llvm-dis
parent395439bb22fac0578d48bf88d57c36318926e4ba (diff)
downloadllvm-197cceaaac8e19b7005d716aade33d1a8ac70214.tar.gz
llvm-197cceaaac8e19b7005d716aade33d1a8ac70214.tar.bz2
llvm-197cceaaac8e19b7005d716aade33d1a8ac70214.tar.xz
don't break reading from stdin
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36336 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-dis')
-rw-r--r--tools/llvm-dis/llvm-dis.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp
index 7a8bf5afc8..bb91ad6fce 100644
--- a/tools/llvm-dis/llvm-dis.cpp
+++ b/tools/llvm-dis/llvm-dis.cpp
@@ -54,8 +54,9 @@ int main(int argc, char **argv) {
std::string ErrorMessage;
std::auto_ptr<Module> M;
-
- M.reset(ParseBitcodeFile(InputFilename, &ErrorMessage));
+
+ if (InputFilename != "-")
+ M.reset(ParseBitcodeFile(InputFilename, &ErrorMessage));
if (M.get() == 0)
M.reset(ParseBytecodeFile(InputFilename,Compressor::decompressToNewBuffer,