diff --git a/tools/llvm-dis/llvm-dis.cpp b/tools/llvm-dis/llvm-dis.cpp index 7a8bf5afc8d..bb91ad6fce6 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,