blob: c97e4b7e14c1479e33a0cb99c47360104cade80a [file] [log] [blame]
Teresa Johnson290a8392019-01-11 18:31:57 +00001; RUN: opt -thinlto-bc -thinlto-split-lto-unit -o %t0.bc %s
Matthew Voss62fcfc52018-12-19 19:07:45 +00002; RUN: llvm-lto2 run -r %t0.bc,__imp_f,l \
3; RUN: -r %t0.bc,g,p \
4; RUN: -r %t0.bc,g,l \
5; RUN: -r %t0.bc,e,l \
6; RUN: -r %t0.bc,main,x \
7; RUN: -save-temps -o %t1 %t0.bc
8; RUN: llvm-dis %t1.1.3.import.bc -o - | FileCheck %s
9source_filename = "test.cpp"
10target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
11target triple = "x86_64-unknown-linux-gnu"
12
13$g = comdat any
14@g = global i8 42, comdat, !type !0
15
16; CHECK: define
17; CHECK-NOT: dllimport
18; CHECK-SAME: @f
19define available_externally dllimport i8* @f() {
20 ret i8* @g
21}
22
23define i8* @e() {
24 ret i8* @g
25}
26
27define i32 @main() {
28 %1 = call i8* @f()
29 %2 = ptrtoint i8* %1 to i32
30 ret i32 %2
31}
32!0 = !{i32 0, !"typeid"}