1 ; RUN: llvm-as -disable-verify %s -o %t.bc
2 ; ---- Full 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-WARN
7 ; 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-WARN
12 ; ---- Thin LTO (optimize, strip main file) -----------------
13 ; RUN: opt -disable-verify -module-summary %s -o %t.bc
14 ; RUN: opt -disable-verify -module-summary %S/Inputs/strip-debug-info-bar.ll \
16 ; RUN: llvm-lto -thinlto -thinlto-action=run \
17 ; RUN: %t.bc -disable-verify 2>&1 | \
18 ; RUN: FileCheck %s -allow-empty -check-prefix=CHECK-WARN
19 ; ---- Thin LTO (optimize, strip imported file) -------------
20 ; RUN: opt -disable-verify -strip-debug -module-summary %t.bc -o %t-stripped.bc
21 ; RUN: llvm-lto -thinlto-action=thinlink -o %t.index.bc %t-stripped.bc %t2.bc
22 ; 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-WARN
28 ; CHECK-ERR: Broken module found, compilation aborted
29 ; CHECK-WARN: warning{{.*}} ignoring invalid debug info
30 ; CHECK-WARN-NOT: Broken module found
32 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
33 target triple = "x86_64-apple-macosx10.12"
42 !llvm.module.flags = !{!0}
45 !0 = !{i32 2, !"Debug Info Version", i32 3}
46 !1 = !DIFile(filename: "broken", directory: "")