• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as %s -o %t1.o
2; RUN: llvm-as %p/Inputs/start-lib1.ll -o %t2.o
3; RUN: llvm-as %p/Inputs/start-lib2.ll -o %t3.o
4
5; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,lx -o %t3 %t1.o %t2.o %t3.o
6; RUN: llvm-readelf -S %t3.0 | FileCheck %s --implicit-check-not=.llvmbc
7
8; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,lx -lto-embed-bitcode=none -o %t3 %t1.o %t2.o %t3.o
9; RUN: llvm-readelf -S %t3.0 | FileCheck %s --implicit-check-not=.llvmbc
10
11; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,lx -lto-embed-bitcode=optimized -o %t3 %t1.o %t2.o %t3.o
12; RUN: llvm-readelf -S %t3.0 | FileCheck %s --check-prefix=CHECK-ELF
13; RUN: llvm-objcopy --dump-section=.llvmbc=%t-embedded.bc %t3.0 /dev/null
14; RUN: llvm-dis %t-embedded.bc -o - | FileCheck %s --check-prefixes=CHECK-LL,CHECK-OPT
15
16; RUN: llvm-lto2 run -r %t1.o,_start,px -r %t2.o,foo,px -r %t3.o,bar,px -r %t2.o,bar,lx -lto-embed-bitcode=post-merge-pre-opt -o %t3 %t1.o %t2.o %t3.o
17; RUN: llvm-readelf -S %t3.0 | FileCheck %s --check-prefix=CHECK-ELF
18; RUN: llvm-objcopy --dump-section=.llvmbc=%t-embedded.bc %t3.0 /dev/null
19; RUN: llvm-dis %t-embedded.bc -o - | FileCheck %s --check-prefixes=CHECK-LL,CHECK-NOOPT
20
21; CHECK-ELF:      .text   PROGBITS 0000000000000000 [[#%x,OFF:]] [[#%x,SIZE:]] 00 AX 0
22; CHECK-ELF-NEXT: .llvmbc PROGBITS 0000000000000000 [[#%x,OFF:]] [[#%x,SIZE:]] 00    0
23
24; CHECK-LL: @_start
25; CHECK-LL: @foo
26; CHECK-OPT-NEXT: ret void
27; CHECK-NOOPT-NEXT: call void @bar
28; CHECK-LL: @bar
29
30target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
31target triple = "x86_64-unknown-linux-gnu"
32
33define void @_start() {
34  ret void
35}
36