summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/Object/nm-darwin-m.test2
-rw-r--r--test/Object/size-trivial-macho.test2
-rw-r--r--tools/llvm-nm/llvm-nm.cpp3
-rw-r--r--tools/llvm-size/llvm-size.cpp1
4 files changed, 6 insertions, 2 deletions
diff --git a/test/Object/nm-darwin-m.test b/test/Object/nm-darwin-m.test
index 6c718128aa..5bb19dcacd 100644
--- a/test/Object/nm-darwin-m.test
+++ b/test/Object/nm-darwin-m.test
@@ -2,7 +2,7 @@ RUN: llvm-nm -format darwin %p/Inputs/darwin-m-test1.mach0-armv7 \
RUN: | FileCheck %s -check-prefix test1
RUN: llvm-nm -format darwin %p/Inputs/darwin-m-test2.macho-i386 \
RUN: | FileCheck %s -check-prefix test2
-RUN: llvm-nm -format darwin %p/Inputs/darwin-m-test3.macho-x86-64 \
+RUN: llvm-nm -m %p/Inputs/darwin-m-test3.macho-x86-64 \
RUN: | FileCheck %s -check-prefix test3
# This is testing that the various bits in the n_desc feild are correct
diff --git a/test/Object/size-trivial-macho.test b/test/Object/size-trivial-macho.test
index 6602d56518..1642790c2c 100644
--- a/test/Object/size-trivial-macho.test
+++ b/test/Object/size-trivial-macho.test
@@ -8,7 +8,7 @@ RUN: llvm-size %p/Inputs/macho-archive-x86_64.a \
RUN: | FileCheck %s -check-prefix AR
RUN: llvm-size -format darwin %p/Inputs/macho-archive-x86_64.a \
RUN: | FileCheck %s -check-prefix mAR
-RUN: llvm-size -format darwin -x -l %p/Inputs/hello-world.macho-x86_64 \
+RUN: llvm-size -m -x -l %p/Inputs/hello-world.macho-x86_64 \
RUN: | FileCheck %s -check-prefix mxl
RUN: llvm-size %p/Inputs/macho-universal.x86_64.i386 \
RUN: | FileCheck %s -check-prefix u
diff --git a/tools/llvm-nm/llvm-nm.cpp b/tools/llvm-nm/llvm-nm.cpp
index 5062435d89..cccddb0736 100644
--- a/tools/llvm-nm/llvm-nm.cpp
+++ b/tools/llvm-nm/llvm-nm.cpp
@@ -81,6 +81,7 @@ cl::alias ExternalOnly2("g", cl::desc("Alias for --extern-only"),
cl::opt<bool> BSDFormat("B", cl::desc("Alias for --format=bsd"));
cl::opt<bool> POSIXFormat("P", cl::desc("Alias for --format=posix"));
+cl::opt<bool> DarwinFormat("m", cl::desc("Alias for --format=darwin"));
cl::opt<bool> PrintFileName(
"print-file-name",
@@ -828,6 +829,8 @@ int main(int argc, char **argv) {
OutputFormat = bsd;
if (POSIXFormat)
OutputFormat = posix;
+ if (DarwinFormat)
+ OutputFormat = darwin;
// The relative order of these is important. If you pass --size-sort it should
// only print out the size. However, if you pass -S --size-sort, it should
diff --git a/tools/llvm-size/llvm-size.cpp b/tools/llvm-size/llvm-size.cpp
index 408bb4a188..b71380dcaa 100644
--- a/tools/llvm-size/llvm-size.cpp
+++ b/tools/llvm-size/llvm-size.cpp
@@ -46,6 +46,7 @@ static cl::opt<OutputFormatTy>
OutputFormatShort(cl::desc("Specify output format"),
cl::values(clEnumValN(sysv, "A", "System V format"),
clEnumValN(berkeley, "B", "Berkeley format"),
+ clEnumValN(darwin, "m", "Darwin -m format"),
clEnumValEnd),
cl::init(berkeley));