2016-08-14 02:01:27 +02:00
|
|
|
; Verify that auto-upgrading intrinsics works with Lazy loaded bitcode
|
|
|
|
; Do setup work for all below tests: generate bitcode and combined index
|
|
|
|
; RUN: opt -module-summary %s -o %t.bc
|
2016-12-30 02:15:50 +01:00
|
|
|
; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %p/Inputs/autoupgrade.bc
|
2016-08-14 02:01:27 +02:00
|
|
|
|
|
|
|
; We can't use llvm-dis here, because it would do the autoupgrade itself.
|
|
|
|
|
2016-12-30 01:45:26 +01:00
|
|
|
; RUN: llvm-link -summary-index=%t3.bc \
|
|
|
|
; RUN: -import=globalfunc1:%p/Inputs/autoupgrade.bc %t.bc \
|
|
|
|
; RUN: | llvm-bcanalyzer -dump | FileCheck %s
|
|
|
|
|
2017-04-17 19:51:36 +02:00
|
|
|
; CHECK: <STRTAB_BLOCK
|
2017-06-28 01:50:11 +02:00
|
|
|
; CHECK-NEXT: blob data = 'mainglobalfunc1llvm.invariant.start.p0i8{{.*}}'
|
2016-08-14 02:01:27 +02:00
|
|
|
|
2018-06-26 04:29:08 +02:00
|
|
|
; Check that the summary is able to print the names despite the lack of
|
|
|
|
; string table in the legacy bitcode.
|
|
|
|
; RUN: llvm-dis %p/Inputs/autoupgrade.bc -o - \
|
|
|
|
; RUN: | FileCheck %s --check-prefix=SUMMARYNAMES
|
|
|
|
; SUMMARYNAMES: ^2 = gv: (name: "globalfunc2",
|
|
|
|
; SUMMARYNAMES: ^3 = gv: (name: "globalfunc1"
|
|
|
|
|
2019-09-11 01:15:38 +02:00
|
|
|
target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
2016-08-14 02:01:27 +02:00
|
|
|
target triple = "x86_64-apple-macosx10.11.0"
|
|
|
|
|
|
|
|
define i32 @main() #0 {
|
|
|
|
entry:
|
|
|
|
call void (...) @globalfunc1()
|
|
|
|
ret i32 0
|
|
|
|
}
|
|
|
|
|
|
|
|
declare void @globalfunc1(...) #1
|