diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2017-04-14 02:55:06 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2017-04-14 02:55:06 +0000 |
commit | a9b9e013db83ae7d51bd7de4934a2ea246bab445 (patch) | |
tree | 90a75c88048a56d5cc5e176a4687d1753582a3c5 /test/LTO | |
parent | c432779417b48cfb0f578c5e3d2ecbb6cd235fcb (diff) |
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@300300 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/LTO')
-rw-r--r-- | test/LTO/Resolution/X86/symtab-elf.ll | 15 | ||||
-rw-r--r-- | test/LTO/Resolution/X86/symtab.ll | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/test/LTO/Resolution/X86/symtab-elf.ll b/test/LTO/Resolution/X86/symtab-elf.ll new file mode 100644 index 00000000000..1683b061c6d --- /dev/null +++ b/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/test/LTO/Resolution/X86/symtab.ll b/test/LTO/Resolution/X86/symtab.ll index e2729ac918a..b7bc1174901 100644 --- a/test/LTO/Resolution/X86/symtab.ll +++ b/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 } |