diff options
author | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-06 08:25:33 +0000 |
---|---|---|
committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-05-06 08:25:33 +0000 |
commit | 3b132e34b09bf45333adc8c0af33277f34bcebb2 (patch) | |
tree | 70e8057e250dbcd6079a5e9a7b777814c4b9aa5a /llvm/test/ThinLTO/X86 | |
parent | 31c9ebe2818b0a47a45867732d946356ca80423e (diff) | |
download | bcm5719-llvm-3b132e34b09bf45333adc8c0af33277f34bcebb2.tar.gz bcm5719-llvm-3b132e34b09bf45333adc8c0af33277f34bcebb2.zip |
ThinLTO: fix assertion and refactor check for hidden use from inline ASM in a helper function
This test was crashing, and currently it breaks bootstrapping clang with debuginfo
Differential Revision: http://reviews.llvm.org/D20008
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268715
Diffstat (limited to 'llvm/test/ThinLTO/X86')
-rw-r--r-- | llvm/test/ThinLTO/X86/Inputs/llvm.used.ll | 11 | ||||
-rw-r--r-- | llvm/test/ThinLTO/X86/llvm.used.ll | 25 |
2 files changed, 36 insertions, 0 deletions
diff --git a/llvm/test/ThinLTO/X86/Inputs/llvm.used.ll b/llvm/test/ThinLTO/X86/Inputs/llvm.used.ll new file mode 100644 index 00000000000..35f5529c2b6 --- /dev/null +++ b/llvm/test/ThinLTO/X86/Inputs/llvm.used.ll @@ -0,0 +1,11 @@ +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.11.0" + + +define i32 @main() #0 { +entry: + call void (...) @globalfunc() + ret i32 0 +} + +declare void @globalfunc(...)
\ No newline at end of file diff --git a/llvm/test/ThinLTO/X86/llvm.used.ll b/llvm/test/ThinLTO/X86/llvm.used.ll new file mode 100644 index 00000000000..4b379f72c25 --- /dev/null +++ b/llvm/test/ThinLTO/X86/llvm.used.ll @@ -0,0 +1,25 @@ +; Do setup work for all below tests: generate bitcode and combined index +; RUN: opt -module-summary %s -o %t.bc +; RUN: opt -module-summary %p/Inputs/llvm.used.ll -o %t2.bc +; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %t2.bc + + +; RUN: llvm-lto -thinlto-action=import %t2.bc -thinlto-index=%t3.bc -o - | llvm-dis -o - | FileCheck %s +; CHECK: define available_externally void @globalfunc + + +target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" +target triple = "x86_64-apple-macosx10.11.0" + + + +define internal void @_ZN12_GLOBAL__N_16Module4dumpEv() { + ret void +} +@llvm.used = appending global [1 x i8*] [i8* bitcast (void ()* @_ZN12_GLOBAL__N_16Module4dumpEv to i8*)], section "llvm.metadata" + + +define void @globalfunc() #0 { +entry: + ret void +} |