brintos

brintos / llvm-project-archived public Read only

0
0
Text · 968 B · 5285634 Raw
29 lines · plain
1; RUN: opt -module-summary %s -o %t1.bc2; RUN: opt -module-summary %p/Inputs/reference_non_importable.ll -o %t2.bc3 4; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \5; RUN:     -r=%t1.bc,_foo,pxl \6; RUN:     -r=%t1.bc,_b,pxl \7; RUN:     -r=%t2.bc,_main,pxl \8; RUN:     -r=%t2.bc,_foo,xl9 10 11 12 13target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"14target triple = "x86_64-apple-macosx10.11.0"15 16; We shouldn't promote the private because it has a section17; RUN: llvm-dis < %t.o.1.2.internalize.bc | FileCheck  %s --check-prefix=PROMOTE18; PROMOTE: @a = private global i8 0, section "__TEXT,__cstring,cstring_literals"19@a = private global i8 0, section "__TEXT,__cstring,cstring_literals"20@b = global ptr@a21 22 23; We want foo to be imported in the main module!24; RUN: llvm-dis < %t.o.2.3.import.bc  | FileCheck  %s --check-prefix=IMPORT25; IMPORT: define available_externally dso_local ptr @foo()26define ptr@foo() {27	ret ptr@b28}29