From: Chris Lattner Date: Sun, 22 Apr 2007 06:35:20 +0000 (+0000) Subject: don't break reading from stdin X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=197cceaaac8e19b7005d716aade33d1a8ac70214;p=oota-llvm.git don't break reading from stdin git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36336 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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,