summaryrefslogtreecommitdiffstats
path: root/llvm/test/Object/objc-imageinfo-elf.ll
diff options
context:
space:
mode:
authorSaleem Abdulrasool <compnerd@compnerd.org>2017-06-05 21:26:39 +0000
committerSaleem Abdulrasool <compnerd@compnerd.org>2017-06-05 21:26:39 +0000
commit4c47434b25ea4683ff1794e2d1b24eaa16b5e30e (patch)
tree58f073f00710fedf41d31cbff3aba4e14053781b /llvm/test/Object/objc-imageinfo-elf.ll
parent790838110fbed51ec9a0ce688c24f81c7c40e89b (diff)
downloadbcm5719-llvm-4c47434b25ea4683ff1794e2d1b24eaa16b5e30e.tar.gz
bcm5719-llvm-4c47434b25ea4683ff1794e2d1b24eaa16b5e30e.zip
CodeGen: add support for emitting ObjC image info
This ensures that we can emit the ObjC Image Info structure on COFF and ELF as well. The frontend already would attempt to emit this information but would get dropped when generating assembly or an object file. llvm-svn: 304736
Diffstat (limited to 'llvm/test/Object/objc-imageinfo-elf.ll')
-rw-r--r--llvm/test/Object/objc-imageinfo-elf.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/test/Object/objc-imageinfo-elf.ll b/llvm/test/Object/objc-imageinfo-elf.ll
new file mode 100644
index 00000000000..7979e01457f
--- /dev/null
+++ b/llvm/test/Object/objc-imageinfo-elf.ll
@@ -0,0 +1,14 @@
+; RUN: llc -mtriple x86_64-unknown-linux-gnu -filetype asm -o - %s | FileCheck %s
+
+!llvm.module.flags = !{!0, !1, !2, !3}
+
+!0 = !{i32 1, !"Objective-C Version", i32 2}
+!1 = !{i32 1, !"Objective-C Image Info Version", i32 0}
+!2 = !{i32 1, !"Objective-C Image Info Section", !"objc_imageinfo"}
+!3 = !{i32 1, !"Objective-C Garbage Collection", i32 2}
+
+; CHECK: .section objc_imageinfo
+; CHECK: OBJC_IMAGE_INFO:
+; CHECK: .long 0
+; CHECK: .long 2
+
OpenPOWER on IntegriCloud