2016-12-02 02:02:30 +01:00
|
|
|
; RUN: opt -module-summary %s -o %t1.bc
|
|
|
|
; RUN: opt -module-summary %p/Inputs/reference_non_importable.ll -o %t2.bc
|
|
|
|
|
2017-04-11 20:12:00 +02:00
|
|
|
; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \
|
2016-12-02 02:02:30 +01:00
|
|
|
; RUN: -r=%t1.bc,_foo,pxl \
|
|
|
|
; RUN: -r=%t1.bc,_b,pxl \
|
|
|
|
; RUN: -r=%t2.bc,_main,pxl \
|
|
|
|
; RUN: -r=%t2.bc,_foo,xl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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-12-02 02:02:30 +01:00
|
|
|
target triple = "x86_64-apple-macosx10.11.0"
|
|
|
|
|
|
|
|
; We shouldn't promote the private because it has a section
|
2017-12-16 03:10:00 +01:00
|
|
|
; RUN: llvm-dis < %t.o.1.2.internalize.bc | FileCheck %s --check-prefix=PROMOTE
|
2016-12-02 02:02:30 +01:00
|
|
|
; PROMOTE: @a = private global i8 0, section "__TEXT,__cstring,cstring_literals"
|
|
|
|
@a = private global i8 0, section "__TEXT,__cstring,cstring_literals"
|
|
|
|
@b = global i8 *@a
|
|
|
|
|
|
|
|
|
|
|
|
; We want foo to be imported in the main module!
|
2017-12-16 03:10:00 +01:00
|
|
|
; RUN: llvm-dis < %t.o.2.3.import.bc | FileCheck %s --check-prefix=IMPORT
|
2017-11-04 18:04:39 +01:00
|
|
|
; IMPORT: define available_externally dso_local i8** @foo()
|
2016-12-02 02:02:30 +01:00
|
|
|
define i8 **@foo() {
|
|
|
|
ret i8 **@b
|
|
|
|
}
|