1 ; REQUIRES: x86-registered-target
2 ; Compile with thinlto indices, to enable thinlto.
3 ; RUN: opt -module-summary %s -o %t1.bc
5 ; Test old lto interface with thinlto.
6 ; RUN: llvm-lto -exported-symbol=main -thinlto-action=run %t1.bc
7 ; RUN: llvm-nm %t1.bc.thinlto.o | FileCheck %s --check-prefix=CHECK-NM
9 ; Test new lto interface with thinlto.
10 ; RUN: llvm-lto2 run %t1.bc -o %t.out -save-temps \
11 ; RUN: -r %t1.bc,bar,pl \
12 ; RUN: -r %t1.bc,__stack_chk_guard,pl \
13 ; RUN: -r %t1.bc,__stack_chk_fail,pl
14 ; RUN: llvm-nm %t.out.1 | FileCheck %s --check-prefix=CHECK-NM
16 ; Re-compile, this time without the thinlto indices.
17 ; RUN: opt %s -o %t4.bc
19 ; Test the new lto interface without thinlto.
20 ; RUN: llvm-lto2 run %t4.bc -o %t5.out -save-temps \
21 ; RUN: -r %t4.bc,bar,pl \
22 ; RUN: -r %t4.bc,__stack_chk_guard,pl \
23 ; RUN: -r %t4.bc,__stack_chk_fail,pl
24 ; RUN: llvm-nm %t5.out.0 | FileCheck %s --check-prefix=CHECK-NM
26 ; Test the old lto interface without thinlto.
27 ; RUN: llvm-lto -exported-symbol=main %t4.bc -o %t6
28 ; RUN: llvm-nm %t6 | FileCheck %s --check-prefix=CHECK-NM
31 ; CHECK-NM: T __stack_chk_fail
32 ; CHECK-NM: D __stack_chk_guard
35 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
36 target triple = "x86_64-unknown-linux-gnu"
42 @__stack_chk_guard = dso_local global i64 1, align 8
44 define void @__stack_chk_fail() {