mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-22 11:42:42 +00:00
[llvm-nm] Remove redundant check for file validity.
We already perform it at the beginning of the function so we can't arrive here with an invalid object. Also, add a test so that bugs won't sneak in the future. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258982 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8362c240ca
commit
1db4cdc3b1
2
test/tools/llvm-nm/invalid-input.test
Normal file
2
test/tools/llvm-nm/invalid-input.test
Normal file
@ -0,0 +1,2 @@
|
||||
RUN: not llvm-nm %s 2>&1 | FileCheck %s -check-prefix=UNKNOWN_FILE_TYPE
|
||||
UNKNOWN_FILE_TYPE: {{.*}}invalid-input.test: The file was not recognized as a valid object file
|
@ -1240,9 +1240,7 @@ static void dumpSymbolNamesFromFile(std::string &Filename) {
|
||||
if (!checkMachOAndArchFlags(O, Filename))
|
||||
return;
|
||||
dumpSymbolNamesFromObject(*O, true);
|
||||
return;
|
||||
}
|
||||
error("unrecognizable file type", Filename);
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user