From 8b1daa3e71109b8ae6a057a1def35ae0ab87ce37 Mon Sep 17 00:00:00 2001 From: Brian Gaeke Date: Wed, 19 Nov 2003 22:15:00 +0000 Subject: [PATCH] Unbreak the "-" as filename hack. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10099 91177308-0d34-0410-b5e6-96231b3b80d8 --- tools/llvm-nm/llvm-nm.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.34.1