Index: lib/Support/CommandLine.cpp =================================================================== --- lib/Support/CommandLine.cpp +++ lib/Support/CommandLine.cpp @@ -1358,8 +1358,6 @@ switch (getNumOccurrencesFlag()) { case Optional: - if (NumOccurrences > 1) - return error("may only occur zero or one times!", ArgName); break; case Required: if (NumOccurrences > 1) Index: test/tools/llvm-nm/X86/externalonly.test =================================================================== --- test/tools/llvm-nm/X86/externalonly.test +++ test/tools/llvm-nm/X86/externalonly.test @@ -1,4 +1,5 @@ # RUN: llvm-nm -g %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s +# RUN: llvm-nm -g -g %p/Inputs/hello.obj.macho-x86_64 | FileCheck %s # CHECK-NOT: EH_frame0 # CHECK: _main