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.
llvm-svn: 258982
--- /dev/null
+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
if (!checkMachOAndArchFlags(O, Filename))
return;
dumpSymbolNamesFromObject(*O, true);
- return;
}
- error("unrecognizable file type", Filename);
}
int main(int argc, char **argv) {