summaryrefslogtreecommitdiffstats
path: root/llvm/test/tools/llvm-objdump/ARM
diff options
context:
space:
mode:
authorKevin Enderby <enderby@apple.com>2016-12-16 22:54:02 +0000
committerKevin Enderby <enderby@apple.com>2016-12-16 22:54:02 +0000
commit59343a9429f67617e6a601767eda98dfc41e46bf (patch)
treea835619c7daf9fa49f700d6b2221bf517ac2ec44 /llvm/test/tools/llvm-objdump/ARM
parent46225b193fd956545be97a83cecb4a3b6d3d6f17 (diff)
downloadbcm5719-llvm-59343a9429f67617e6a601767eda98dfc41e46bf.tar.gz
bcm5719-llvm-59343a9429f67617e6a601767eda98dfc41e46bf.zip
Fix a bugs with using some Mach-O command line flags like "-arch armv7m".
The Mach-O command line flag like "-arch armv7m" does not match the arch name part of its llvm Triple which is "thumbv7m-apple-darwin”. I think the best way to fix this is to have llvm::object::MachOObjectFile::getArchTriple() optionally return the name of the Mach-O arch flag that would be used with -arch that matches the CPUType and CPUSubType. Then change llvm::object::MachOUniversalBinary::ObjectForArch::getArchTypeName() to use that and change it to getArchFlagName() as the type name is really part of the Triple and the -arch flag name is a Mach-O thing for a specific Triple with a specific Mcpu value. rdar://29663637 llvm-svn: 290001
Diffstat (limited to 'llvm/test/tools/llvm-objdump/ARM')
-rw-r--r--llvm/test/tools/llvm-objdump/ARM/Inputs/fat-armv7m.obin0 -> 16664 bytes
-rw-r--r--llvm/test/tools/llvm-objdump/ARM/macho-arch-armv7m-flag.test5
2 files changed, 5 insertions, 0 deletions
diff --git a/llvm/test/tools/llvm-objdump/ARM/Inputs/fat-armv7m.o b/llvm/test/tools/llvm-objdump/ARM/Inputs/fat-armv7m.o
new file mode 100644
index 00000000000..2b478e36c45
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/ARM/Inputs/fat-armv7m.o
Binary files differ
diff --git a/llvm/test/tools/llvm-objdump/ARM/macho-arch-armv7m-flag.test b/llvm/test/tools/llvm-objdump/ARM/macho-arch-armv7m-flag.test
new file mode 100644
index 00000000000..6a19e306666
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/ARM/macho-arch-armv7m-flag.test
@@ -0,0 +1,5 @@
+@ RUN: llvm-objdump -macho -d -arch armv7m %p/Inputs/fat-armv7m.o | FileCheck %s
+@ CHECK: fat-armv7m.o:
+@ CHECK: (__TEXT,__text) section
+@ CHECK: foo:
+@ CHECK: 00 bf nop
OpenPOWER on IntegriCloud