summaryrefslogtreecommitdiffstats
path: root/llvm/test/LTO/Resolution
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-04-14 02:55:06 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-04-14 02:55:06 +0000
commit8446f1fe6a5afd89c0f24e5500fce675390ce87b (patch)
tree800cf0ab92411704f2b4e6b82f0ce7a799476045 /llvm/test/LTO/Resolution
parent2f72b19b05e86321b40c048ed7fdd0a9637d93d8 (diff)
downloadbcm5719-llvm-8446f1fe6a5afd89c0f24e5500fce675390ce87b.tar.gz
bcm5719-llvm-8446f1fe6a5afd89c0f24e5500fce675390ce87b.zip
Object, LTO: Add target triple to irsymtab and LTO API.
Start using it in LLD to avoid needing to read bitcode again just to get the target triple, and in llvm-lto2 to avoid printing symbol table information that is inappropriate for the target. Differential Revision: https://reviews.llvm.org/D32038 llvm-svn: 300300
Diffstat (limited to 'llvm/test/LTO/Resolution')
-rw-r--r--llvm/test/LTO/Resolution/X86/symtab-elf.ll15
-rw-r--r--llvm/test/LTO/Resolution/X86/symtab.ll3
2 files changed, 17 insertions, 1 deletions
diff --git a/llvm/test/LTO/Resolution/X86/symtab-elf.ll b/llvm/test/LTO/Resolution/X86/symtab-elf.ll
new file mode 100644
index 00000000000..1683b061c6d
--- /dev/null
+++ b/llvm/test/LTO/Resolution/X86/symtab-elf.ll
@@ -0,0 +1,15 @@
+; RUN: llvm-as -o %t %s
+; RUN: llvm-lto2 dump-symtab %t | FileCheck %s
+
+; CHECK: target triple: x86_64-unknown-linux-gnu
+target triple = "x86_64-unknown-linux-gnu"
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+
+; CHECK-NOT: linker opts:
+!0 = !{i32 6, !"Linker Options", !{!{!"/include:foo"}}}
+!llvm.module.flags = !{ !0 }
+
+@g1 = global i32 0
+
+; CHECK-NOT: fallback g1
+@g2 = weak alias i32, i32* @g1
diff --git a/llvm/test/LTO/Resolution/X86/symtab.ll b/llvm/test/LTO/Resolution/X86/symtab.ll
index e2729ac918a..b7bc1174901 100644
--- a/llvm/test/LTO/Resolution/X86/symtab.ll
+++ b/llvm/test/LTO/Resolution/X86/symtab.ll
@@ -1,13 +1,14 @@
; RUN: llvm-as -o %t %s
; RUN: llvm-lto2 dump-symtab %t | FileCheck %s
+; CHECK: target triple: i686-pc-windows-msvc18.0.0
target triple = "i686-pc-windows-msvc18.0.0"
target datalayout = "e-m:x-p:32:32-i64:64-f80:32-n8:16:32-a:0:32-S32"
; CHECK: source filename: src.c
source_filename = "src.c"
-; CHECK: linker opts (COFF only): /include:foo
+; CHECK: linker opts: /include:foo
!0 = !{i32 6, !"Linker Options", !{!{!"/include:foo"}}}
!llvm.module.flags = !{ !0 }
OpenPOWER on IntegriCloud