Add a test case for the crash fixed with r267037. David Blaikie said it would be...
authorKevin Enderby <enderby@apple.com>
Wed, 27 Apr 2016 20:37:06 +0000 (20:37 +0000)
committerKevin Enderby <enderby@apple.com>
Wed, 27 Apr 2016 20:37:06 +0000 (20:37 +0000)
This was crashing llvm-objdump with -macho -objc-meta-data when trying dump a non-existent section.
So the test binary is simply created from an empty .s file compiled with: clang -arch armv7 empty.s -c

llvm-svn: 267782

llvm/test/tools/llvm-objdump/Inputs/empty.macho-armv7 [new file with mode: 0644]
llvm/test/tools/llvm-objdump/macho-objc-meta-data.test [new file with mode: 0644]

diff --git a/llvm/test/tools/llvm-objdump/Inputs/empty.macho-armv7 b/llvm/test/tools/llvm-objdump/Inputs/empty.macho-armv7
new file mode 100644 (file)
index 0000000..ab6c053
Binary files /dev/null and b/llvm/test/tools/llvm-objdump/Inputs/empty.macho-armv7 differ
diff --git a/llvm/test/tools/llvm-objdump/macho-objc-meta-data.test b/llvm/test/tools/llvm-objdump/macho-objc-meta-data.test
new file mode 100644 (file)
index 0000000..e659e7e
--- /dev/null
@@ -0,0 +1,3 @@
+# RUN: llvm-objdump -macho -objc-meta-data %p/Inputs/empty.macho-armv7 | FileCheck %s
+
+# CHECK: empty.macho-armv7: