37 lines · plain
1; REQUIRES: x862; RUN: rm -rf %t && mkdir -p %t && cd %t3; RUN: opt -thinlto-bc -o main.bc %s4; RUN: opt -thinlto-bc -o foo.bc %S/Inputs/lto-dep.ll5 6; Even if the native object is cached, the PDB must be the same.7; RUN: rm -rf thinltocachedir && mkdir thinltocachedir8 9; RUN: lld-link /lldltocache:thinltocachedir /out:main.exe /entry:main /subsystem:console main.bc foo.bc /debug /pdb:main.pdb10 11; RUN: llvm-pdbutil dump --modules main.pdb | FileCheck %s12 13; Run again with the cache. Make sure we get the same object names.14 15; RUN: lld-link /lldltocache:thinltocachedir /out:main.exe /entry:main /subsystem:console main.bc foo.bc /debug /pdb:main.pdb16 17; RUN: llvm-pdbutil dump --modules main.pdb | FileCheck %s18 19 20target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"21target triple = "x86_64-pc-windows-msvc"22 23define i32 @main() {24 call void @foo()25 ret i32 026}27 28declare void @foo()29 30; CHECK: Modules31; CHECK: ============================================================32; CHECK: Mod 0000 | `{{.*}}main.exe.lto.main.obj`:33; CHECK: Obj: `{{.*}}main.exe.lto.main.obj`:34; CHECK: Mod 0001 | `{{.*}}main.exe.lto.foo.obj`:35; CHECK: Obj: `{{.*}}main.exe.lto.foo.obj`:36; CHECK: Mod 0002 | `* Linker *`:37