1; RUN: llvm-as -disable-verify %s -o %t.bc 2; ---- 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-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 -disable-upgrade-debug-info -module-summary %s -o %t.bc 14; RUN: opt -disable-verify -disable-upgrade-debug-info -module-summary %S/Inputs/strip-debug-info-bar.ll \ 15; RUN: -o %t2.bc 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 -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 27 28; CHECK-ERR: Broken module found, compilation aborted 29; CHECK-WARN: warning{{.*}} ignoring invalid debug info 30; CHECK-WARN-NOT: Broken module found 31; CHECK: foo 32target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 33target triple = "x86_64-apple-macosx10.12" 34 35declare void @bar() 36 37define void @foo() { 38 call void @bar() 39 ret void 40} 41 42!llvm.module.flags = !{!0} 43!llvm.dbg.cu = !{!1} 44 45!0 = !{i32 2, !"Debug Info Version", i32 3} 46!1 = !DIFile(filename: "broken", directory: "") 47