brintos

brintos / llvm-project-archived public Read only

0
0
Text · 981 B · 8e5620b Raw
27 lines · plain
1; Test mixed-mode LTO (mix of regular and thin LTO objects)2; RUN: opt %s -o %t1.o3; RUN: opt -module-summary %p/Inputs/mixed_lto.ll -o %t2.o4 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,px6 7; Task 0 is the regular LTO file (this file)8; RUN: llvm-nm %t3.o.0 | FileCheck %s --check-prefix=NM09; NM0: T g10 11; Task 1 is the (first) ThinLTO file (Inputs/mixed_lto.ll)12; RUN: llvm-nm %t3.o.1 | FileCheck %s --check-prefix=NM113; NM1-DAG: T main14; NM1-DAG: U g15 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.o18; RUN: llvm-lto2 run -o %t5.o %t4.o -r %t4.o,main,px -r %t4.o,g, -r %t4.o,g,px19; RUN: llvm-nm %t5.o.0 | FileCheck %s --check-prefix=NM020; RUN: llvm-nm %t5.o.1 | FileCheck %s --check-prefix=NM121 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 026}27