diff options
author | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-19 22:15:00 +0000 |
---|---|---|
committer | Brian Gaeke <gaeke@uiuc.edu> | 2003-11-19 22:15:00 +0000 |
commit | 8b1daa3e71109b8ae6a057a1def35ae0ab87ce37 (patch) | |
tree | 31e3259ed1027acdbe1eed0f8ef5e73d0ed7cc44 /tools/llvm-nm | |
parent | 55ee03100cdd4c3a70bcde7d7ee556f9d4de0dc0 (diff) |
Unbreak the "-" as filename hack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10099 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/llvm-nm')
-rw-r--r-- | tools/llvm-nm/llvm-nm.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp index 8f543cf609..8678536962 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); |