annotate test/ThinLTO/X86/reference_non_importable.ll @ 121:803732b1fca8

LLVM 5.0
author kono
date Fri, 27 Oct 2017 17:07:41 +0900
parents
children 3a76565eade5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
121
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
1 ; RUN: opt -module-summary %s -o %t1.bc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
2 ; RUN: opt -module-summary %p/Inputs/reference_non_importable.ll -o %t2.bc
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
3
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
4 ; RUN: llvm-lto2 run %t1.bc %t2.bc -o %t.o -save-temps \
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
5 ; RUN: -r=%t1.bc,_foo,pxl \
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
6 ; RUN: -r=%t1.bc,_b,pxl \
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
7 ; RUN: -r=%t2.bc,_main,pxl \
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
8 ; RUN: -r=%t2.bc,_foo,xl
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
9
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
10
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
11
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
12
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
13 target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
14 target triple = "x86_64-apple-macosx10.11.0"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
15
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
16 ; We shouldn't promote the private because it has a section
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
17 ; RUN: llvm-dis < %t.o.0.2.internalize.bc | FileCheck %s --check-prefix=PROMOTE
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
18 ; PROMOTE: @a = private global i8 0, section "__TEXT,__cstring,cstring_literals"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
19 @a = private global i8 0, section "__TEXT,__cstring,cstring_literals"
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
20 @b = global i8 *@a
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
21
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
22
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
23 ; We want foo to be imported in the main module!
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
24 ; RUN: llvm-dis < %t.o.1.3.import.bc | FileCheck %s --check-prefix=IMPORT
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
25 ; IMPORT: define available_externally i8** @foo()
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
26 define i8 **@foo() {
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
27 ret i8 **@b
803732b1fca8 LLVM 5.0
kono
parents:
diff changeset
28 }