summaryrefslogtreecommitdiffstats
path: root/llvm/test
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-04-22 23:21:13 +0000
committerTim Northover <tnorthover@apple.com>2016-04-22 23:21:13 +0000
commit9e8eb418e583974c7d24ca3d81f567accd5adbfa (patch)
tree190ba0bd9001e19d01db501f813692edc77b2140 /llvm/test
parentcae0855a62d2dc09fddc581f7a52d10c43b17571 (diff)
downloadbcm5719-llvm-9e8eb418e583974c7d24ca3d81f567accd5adbfa.tar.gz
bcm5719-llvm-9e8eb418e583974c7d24ca3d81f567accd5adbfa.zip
MachO: remove weird ARM/Thumb interface from MachOObjectFile
Only one consumer (llvm-objdump) actually cared about the fact that there were two triples. Others were actively working around the fact that the Triple returned by getArch might have been invalid. As for llvm-objdump, it needs to be acutely aware of both Triples anyway, so being generic in the exposed API is no benefit. Also rename the version of getArch returning a Triple. Users were having to pass an unwanted nullptr to disambiguate the two, which was nasty. The only functional change here is that armv7m and armv7em object files no longer crash llvm-objdump. llvm-svn: 267249
Diffstat (limited to 'llvm/test')
-rw-r--r--llvm/test/tools/dsymutil/ARM/dummy-debug-map.map2
-rw-r--r--llvm/test/tools/dsymutil/arch-option.test4
-rw-r--r--llvm/test/tools/llvm-objdump/ARM/macho-v7m.test10
-rw-r--r--llvm/test/tools/llvm-symbolizer/fat.test4
4 files changed, 15 insertions, 5 deletions
diff --git a/llvm/test/tools/dsymutil/ARM/dummy-debug-map.map b/llvm/test/tools/dsymutil/ARM/dummy-debug-map.map
index aa69aeafedb..a6fb47dd011 100644
--- a/llvm/test/tools/dsymutil/ARM/dummy-debug-map.map
+++ b/llvm/test/tools/dsymutil/ARM/dummy-debug-map.map
@@ -6,7 +6,7 @@
# you can extend this file with as much object files and symbols as needed.
---
-triple: 'thumbv7-apple-darwin'
+triple: 'armv7-apple-darwin'
objects:
- filename: 1.o
symbols:
diff --git a/llvm/test/tools/dsymutil/arch-option.test b/llvm/test/tools/dsymutil/arch-option.test
index 0920efb529d..a028bd7e060 100644
--- a/llvm/test/tools/dsymutil/arch-option.test
+++ b/llvm/test/tools/dsymutil/arch-option.test
@@ -14,14 +14,14 @@ RUN: not llvm-dsymutil -oso-prepend-path %p -dump-debug-map %p/Inputs/fat-test.a
ARMV7: ---
ARMV7-NOT: ...
-ARMV7: triple: 'thumbv7-apple-darwin'
+ARMV7: triple: 'armv7-apple-darwin'
ARMV7-NOT: ...
ARMV7: sym: _armv7_var
ARMV7-NOT: ---
ARMV7S: ---
ARMV7S-NOT: ...
-ARMV7S: triple: 'thumbv7s-apple-darwin'
+ARMV7S: triple: 'armv7s-apple-darwin'
ARMV7S-NOT: ...
ARMV7S: sym: _armv7s_var
ARMV7S-NOT: ---
diff --git a/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test b/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test
new file mode 100644
index 00000000000..938aa4f7d60
--- /dev/null
+++ b/llvm/test/tools/llvm-objdump/ARM/macho-v7m.test
@@ -0,0 +1,10 @@
+@ RUN: llvm-mc < %s -triple thumbv7m-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s
+@ RUN: llvm-mc < %s -triple thumbv7em-apple-macho -filetype=obj | llvm-objdump -macho -d - | FileCheck %s
+
+ .thumb
+ .thumb_func _t
+_t:
+ @ A nice Cortex-M only instruction to make sure the default CPU is sound.
+ msr msp, r0
+
+@ CHECK: msr msp, r0 \ No newline at end of file
diff --git a/llvm/test/tools/llvm-symbolizer/fat.test b/llvm/test/tools/llvm-symbolizer/fat.test
index 1ecd1abb356..f943150441f 100644
--- a/llvm/test/tools/llvm-symbolizer/fat.test
+++ b/llvm/test/tools/llvm-symbolizer/fat.test
@@ -1,8 +1,8 @@
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=x86_64 | FileCheck --check-prefix=X86_64 %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=x86_64h | FileCheck --check-prefix=X86_64H %s
RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7 | FileCheck --check-prefix=ARMV7 %s
-RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7em | FileCheck --check-prefix=ARMV7EM %s
-RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=armv7m | FileCheck --check-prefix=ARMV7M %s
+RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=thumbv7em | FileCheck --check-prefix=ARMV7EM %s
+RUN: echo 0 | llvm-symbolizer -obj=%p/Inputs/fat.o -default-arch=thumbv7m | FileCheck --check-prefix=ARMV7M %s
X86_64: x86_64_function
X86_64H: x86_64h_function
OpenPOWER on IntegriCloud