brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.3 KiB · c478f64 Raw
54 lines · plain
1; RUN: llvm-as -disable-verify %s -o %t.bc2; ---- Full LTO ---------------------------------------------3; RUN: llvm-lto \4; RUN:     -exported-symbol foo -exported-symbol _foo \5; RUN:     -o %t.o %t.bc 2>&1 | \6; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-WARN7; RUN: llvm-nm %t.o | FileCheck %s 8; ---- Thin LTO (codegen only) ------------------------------9; RUN: llvm-lto -thinlto -thinlto-action=codegen \10; RUN:     %t.bc -disable-verify 2>&1 | \11; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-WARN12; ---- Thin LTO (optimize, strip main file) -----------------13; RUN: opt -disable-verify -disable-upgrade-debug-info -module-summary %s -o %t.bc14; RUN: opt -disable-verify -disable-upgrade-debug-info -module-summary %S/Inputs/strip-debug-info-bar.ll \15; RUN:     -o %t2.bc16; RUN: llvm-lto -thinlto -thinlto-action=run \17; RUN:     %t.bc -disable-verify 2>&1 | \18; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-WARN19; ---- Thin LTO (optimize, strip imported file) -------------20; RUN: opt -module-summary %t.bc -o %t-stripped.bc21; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t-stripped.bc %t2.bc22; RUN: llvm-lto -thinlto -thinlto-action=import \23; RUN:     -thinlto-index=%t.index.bc \24; RUN:     -exported-symbol foo -exported-symbol _foo \25; RUN:     %t-stripped.bc -disable-verify 2>&1 | \26; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-WARN27; ---- Thin LTO (optimize, don't strip imported file)28; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t-stripped.bc %t2.bc29; RUN: llvm-lto -thinlto -thinlto-action=import -disable-auto-upgrade-debug-info \30; RUN:     -thinlto-index=%t.index.bc \31; RUN:     -exported-symbol foo -exported-symbol _foo \32; RUN:     %t-stripped.bc -disable-verify 2>&1 | \33; RUN:     FileCheck %s -allow-empty -check-prefix=CHECK-NO-WARN34 35; CHECK-WARN: warning{{.*}} ignoring invalid debug info36; CHECK-WARN-NOT: Broken module found37; CHECK: foo38; CHECK-NO-WARN-NOT: ignoring invalid debug info39target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"40target triple = "x86_64-apple-macosx10.12"41 42declare void @bar()43 44define void @foo() {45  call void @bar()46  ret void47}48 49!llvm.module.flags = !{!0}50!llvm.dbg.cu = !{!1}51 52!0 = !{i32 2, !"Debug Info Version", i32 3}53!1 = !DIFile(filename: "broken", directory: "")54