32 lines · plain
1; Verify that auto-upgrading intrinsics works with Lazy loaded bitcode2; Do setup work for all below tests: generate bitcode and combined index3; RUN: opt -module-summary %s -o %t.bc4; RUN: llvm-lto -thinlto-action=thinlink -o %t3.bc %t.bc %p/Inputs/autoupgrade.bc5 6; We can't use llvm-dis here, because it would do the autoupgrade itself.7 8; RUN: llvm-link -summary-index=%t3.bc \9; RUN: -import=globalfunc1:%p/Inputs/autoupgrade.bc %t.bc \10; RUN: | llvm-bcanalyzer -dump | FileCheck %s11 12; CHECK: <STRTAB_BLOCK13; CHECK-NEXT: blob data = 'mainglobalfunc1llvm.invariant.start.p0{{.*}}'14 15; Check that the summary is able to print the names despite the lack of16; string table in the legacy bitcode.17; RUN: llvm-dis %p/Inputs/autoupgrade.bc -o - \18; RUN: | FileCheck %s --check-prefix=SUMMARYNAMES19; SUMMARYNAMES: ^2 = gv: (name: "globalfunc2",20; SUMMARYNAMES: ^3 = gv: (name: "globalfunc1"21 22target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"23target triple = "x86_64-apple-macosx10.11.0"24 25define i32 @main() #0 {26entry:27 call void (...) @globalfunc1()28 ret i32 029}30 31declare void @globalfunc1(...) #132