• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; Test mixed-mode LTO (mix of regular and thin LTO objects)
2; RUN: opt %s -o %t1.o
3; RUN: opt -module-summary %p/Inputs/mixed_lto.ll -o %t2.o
4
5; RUN: llvm-lto2 run -o %t3.o %t2.o %t1.o -r %t2.o,main,px -r %t2.o,g, -r %t1.o,g,px
6
7; Task 0 is the regular LTO file (this file)
8; RUN: llvm-nm %t3.o.0 | FileCheck %s --check-prefix=NM0
9; NM0: T g
10
11; Task 1 is the (first) ThinLTO file (Inputs/mixed_lto.ll)
12; RUN: llvm-nm %t3.o.1 | FileCheck %s --check-prefix=NM1
13; NM1-DAG: T main
14; NM1-DAG: U g
15
16; Do the same test again, but with the regular and thin LTO modules in the same file.
17; RUN: llvm-cat -b -o %t4.o %t2.o %t1.o
18; RUN: llvm-lto2 run -o %t5.o %t4.o -r %t4.o,main,px -r %t4.o,g, -r %t4.o,g,px
19; RUN: llvm-nm %t5.o.0 | FileCheck %s --check-prefix=NM0
20; RUN: llvm-nm %t5.o.1 | FileCheck %s --check-prefix=NM1
21
22target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
23target triple = "x86_64-unknown-linux-gnu"
24define i32 @g() {
25  ret i32 0
26}
27