1; RUN: opt -module-summary %s -o %t1.bc 2; RUN: opt -module-summary %p/Inputs/globals-import-cf-baz.ll -o %t2.bc 3; RUN: llvm-lto -thinlto-action=thinlink %t1.bc %t2.bc -o %t3.index.bc 4 5; RUN: llvm-lto -thinlto-action=import -exported-symbol=main %t1.bc -thinlto-index=%t3.index.bc 6; RUN: llvm-dis %t1.bc.thinlto.imported.bc -o - | FileCheck --check-prefix=IMPORT %s 7; RUN: llvm-lto -thinlto-action=optimize %t1.bc.thinlto.imported.bc -o %t1.bc.thinlto.opt.bc 8; RUN: llvm-dis %t1.bc.thinlto.opt.bc -o - | FileCheck --check-prefix=OPTIMIZE %s 9 10; IMPORT: @baz = internal local_unnamed_addr constant i32 10 11 12; OPTIMIZE: define i32 @main() 13; OPTIMIZE-NEXT: ret i32 10 14 15target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 16target triple = "x86_64-pc-linux-gnu" 17 18@baz = external local_unnamed_addr constant i32, align 4 19 20define i32 @main() local_unnamed_addr { 21 %1 = load i32, i32* @baz, align 4 22 ret i32 %1 23} 24