2017-11-04 18:04:39 +01:00
|
|
|
; RUN: opt -module-summary %s -o %t1.bc
|
2016-04-24 05:18:01 +02:00
|
|
|
; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t1.bc
|
|
|
|
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - | llvm-dis -o - | FileCheck %s --check-prefix=REGULAR
|
|
|
|
; RUN: llvm-lto -thinlto-action=internalize -thinlto-index %t.index.bc %t1.bc -o - --exported-symbol=foo | llvm-dis -o - | FileCheck %s --check-prefix=INTERNALIZE
|
|
|
|
|
2017-04-11 20:12:00 +02:00
|
|
|
; RUN: llvm-lto2 run %t1.bc -o %t.o -save-temps \
|
2016-08-18 02:59:24 +02:00
|
|
|
; RUN: -r=%t1.bc,_foo,pxl \
|
|
|
|
; RUN: -r=%t1.bc,_bar,pl \
|
|
|
|
; RUN: -r=%t1.bc,_linkonce_func,pl
|
2017-12-16 03:10:00 +01:00
|
|
|
; RUN: llvm-dis < %t.o.1.2.internalize.bc | FileCheck %s --check-prefix=INTERNALIZE2
|
2016-08-18 02:59:24 +02:00
|
|
|
|
|
|
|
|
2016-04-24 05:18:01 +02:00
|
|
|
; REGULAR: define void @foo
|
|
|
|
; REGULAR: define void @bar
|
2016-08-18 02:59:24 +02:00
|
|
|
; REGULAR: define linkonce void @linkonce_func()
|
2016-04-24 05:18:01 +02:00
|
|
|
; INTERNALIZE: define void @foo
|
|
|
|
; INTERNALIZE: define internal void @bar
|
2016-08-18 02:59:24 +02:00
|
|
|
; INTERNALIZE: define internal void @linkonce_func()
|
2017-11-04 18:04:39 +01:00
|
|
|
; INTERNALIZE2: define dso_local void @foo
|
2018-01-11 23:15:05 +01:00
|
|
|
; INTERNALIZE2: define internal void @bar
|
|
|
|
; INTERNALIZE2: define internal void @linkonce_func()
|
2016-04-24 05:18:01 +02:00
|
|
|
|
|
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
|
|
target triple = "x86_64-apple-macosx10.11.0"
|
|
|
|
|
|
|
|
define void @foo() {
|
2018-01-29 09:03:30 +01:00
|
|
|
call void @bar()
|
2016-04-24 05:18:01 +02:00
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define void @bar() {
|
2016-08-18 02:59:24 +02:00
|
|
|
call void @linkonce_func()
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
define linkonce void @linkonce_func() {
|
2016-04-24 05:18:01 +02:00
|
|
|
ret void
|
2017-11-04 18:04:39 +01:00
|
|
|
}
|