From: Brian Gaeke Date: Wed, 19 Nov 2003 22:15:00 +0000 (+0000) Subject: Unbreak the "-" as filename hack. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=8b1daa3e71109b8ae6a057a1def35ae0ab87ce37;p=oota-llvm.git Unbreak the "-" as filename hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10099 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 8f543cf6097..8678536962d 100644 --- a/tools/llvm-nm/llvm-nm.cpp +++ b/tools/llvm-nm/llvm-nm.cpp @@ -114,12 +114,13 @@ void DumpSymbolNamesFromModule (Module *M) { void DumpSymbolNamesFromFile (std::string &Filename) { std::string ErrorMessage; - if (!FileOpenable (Filename)) { + if (Filename != "-" && !FileOpenable (Filename)) { std::cerr << ToolName << ": " << Filename << ": " << strerror (errno) << "\n"; return; } - if (IsBytecode (Filename)) { + // Note: Currently we do not support reading an archive from stdin. + if (Filename == "-" || IsBytecode (Filename)) { Module *Result = ParseBytecodeFile(Filename, &ErrorMessage); if (Result) { DumpSymbolNamesFromModule (Result);