Index: test/tools/llvm-nm/X86/nm-no-symbols.test =================================================================== --- test/tools/llvm-nm/X86/nm-no-symbols.test +++ test/tools/llvm-nm/X86/nm-no-symbols.test @@ -2,6 +2,9 @@ # RUN: llvm-nm %t.o 2>&1 | FileCheck %s # RUN: llvm-nm --print-file-name %t.o 2>&1 | FileCheck %s --check-prefix=CHECK-PRINT-FILE-NAME +# Check that --special-syms doesn't trigger error +# RUN: llvm-nm --special-syms %t.o 2>&1 | FileCheck %s + !ELF FileHeader: Class: ELFCLASS64 Index: tools/llvm-nm/llvm-nm.cpp =================================================================== --- tools/llvm-nm/llvm-nm.cpp +++ tools/llvm-nm/llvm-nm.cpp @@ -164,6 +164,9 @@ cl::alias JustSymbolNames("j", cl::desc("Alias for --just-symbol-name"), cl::aliasopt(JustSymbolName), cl::Grouping); +cl::opt SpecialSyms("special-syms", + cl::desc("No-op. Used for GNU compatibility only")); + // FIXME: This option takes exactly two strings and should be allowed anywhere // on the command line. Such that "llvm-nm -s __TEXT __text foo.o" would work. // But that does not as the CommandLine Library does not have a way to make