From 60c4e6aafa8904eecb79a2109ed4c8b8be942005 Mon Sep 17 00:00:00 2001 From: Kevin Enderby Date: Wed, 27 Apr 2016 20:37:06 +0000 Subject: [PATCH] Add a test case for the crash fixed with r267037. David Blaikie said it would be nice to have! 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 --- .../tools/llvm-objdump/Inputs/empty.macho-armv7 | Bin 0 -> 152 bytes .../tools/llvm-objdump/macho-objc-meta-data.test | 3 +++ 2 files changed, 3 insertions(+) create mode 100644 llvm/test/tools/llvm-objdump/Inputs/empty.macho-armv7 create mode 100644 llvm/test/tools/llvm-objdump/macho-objc-meta-data.test 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 index 0000000000000000000000000000000000000000..ab6c053e73751eed2f3d2a3d71f6843474597845 GIT binary patch literal 152 zcmX^2>+L@t1_lOBAZCQ(8Xye6%I8iYaWK_EW9B(9L+AI1mL4KOwU4QdMs literal 0 HcmV?d00001 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 index 000000000000..e659e7e57711 --- /dev/null +++ b/llvm/test/tools/llvm-objdump/macho-objc-meta-data.test @@ -0,0 +1,3 @@ +# RUN: llvm-objdump -macho -objc-meta-data %p/Inputs/empty.macho-armv7 | FileCheck %s + +# CHECK: empty.macho-armv7: