Index: test/tools/llvm-nm/X86/posix-aliases.test =================================================================== --- test/tools/llvm-nm/X86/posix-aliases.test +++ test/tools/llvm-nm/X86/posix-aliases.test @@ -0,0 +1,5 @@ +# RUN: llvm-nm -P %p/Inputs/hello.obj.elf-x86_64 > %t1 +# RUN: llvm-nm -format=posix %p/Inputs/hello.obj.elf-x86_64 > %t2 +# RUN: llvm-nm -portability %p/Inputs/hello.obj.elf-x86_64 > %t3 +# RUN: diff %t1 %t2 +# RUN: diff %t1 %t3 Index: tools/llvm-nm/llvm-nm.cpp =================================================================== --- tools/llvm-nm/llvm-nm.cpp +++ tools/llvm-nm/llvm-nm.cpp @@ -91,6 +91,8 @@ cl::Grouping); cl::opt POSIXFormat("P", cl::desc("Alias for --format=posix"), cl::Grouping); +cl::alias Portability("portability", cl::desc("Alias for --format=posix"), + cl::aliasopt(POSIXFormat), cl::NotHidden); cl::opt DarwinFormat("m", cl::desc("Alias for --format=darwin"), cl::Grouping);