From 197cceaaac8e19b7005d716aade33d1a8ac70214 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sun, 22 Apr 2007 06:35:20 +0000 Subject: don't break reading from stdin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36336 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-dis/llvm-dis.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tools/llvm-dis') 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 M; - - M.reset(ParseBitcodeFile(InputFilename, &ErrorMessage)); + + if (InputFilename != "-") + M.reset(ParseBitcodeFile(InputFilename, &ErrorMessage)); if (M.get() == 0) M.reset(ParseBytecodeFile(InputFilename,Compressor::decompressToNewBuffer, -- cgit v1.2.3