blob: 02b15c61154487bbbb50589c6b4a74549e01a2c0 [file] [log] [blame]
Teresa Johnson8dd61ae2016-09-16 13:54:19 +00001; 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 -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)
Teresa Johnsona8f65202016-09-16 17:12:48 +00008; RUN: llvm-nm %t3.o.0 | FileCheck %s --check-prefix=NM0
Teresa Johnson8dd61ae2016-09-16 13:54:19 +00009; NM0: T g
10
11; Task 1 is the (first) ThinLTO file (Inputs/mixed_lto.ll)
Teresa Johnsona8f65202016-09-16 17:12:48 +000012; RUN: llvm-nm %t3.o.1 | FileCheck %s --check-prefix=NM1
Teresa Johnson8dd61ae2016-09-16 13:54:19 +000013; NM1-DAG: T main
14; NM1-DAG: U g
15
Peter Collingbourne1a0720e2016-12-14 01:17:59 +000016; 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 -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
Eric Christopher08240962017-02-10 04:35:32 +000022target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
Teresa Johnson8dd61ae2016-09-16 13:54:19 +000023target triple = "x86_64-unknown-linux-gnu"
24define i32 @g() {
25 ret i32 0
26}