brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · cfd6c4b Raw
46 lines · plain
1; RUN: opt -thinlto-bc %s -o %t1.bc2; RUN: opt -thinlto-bc %p/Inputs/import-metadata.ll -o %t2.bc3; RUN: llvm-lto2 run -save-temps %t1.bc %t2.bc -o %t-out \4; RUN:    -r=%t1.bc,main,plx \5; RUN:    -r=%t1.bc,foo,l \6; RUN:    -r=%t2.bc,foo,pl7; RUN: llvm-dis %t-out.1.3.import.bc -o - | FileCheck %s8 9;; Check the imported DICompileUnit doesn't have the enums operand.10;; Also check the imported md metadata that shares a node with the 11;; enums operand originally is not null.12 13; CHECK: !llvm.dbg.cu = !{![[#CU1:]], ![[#CU2:]]}14;; Note that MD1 comes from the current module. MD2 is from the imported module. 15;; We are checking that MD2 is unified with MD1 and the imported MD2 doesn't16;; end up having a null operand.17; CHECK: !llvm.md = !{![[#MD1:]]}18; CHECK: ![[#MD3:]] = !{}19; CHECK: ![[#CU2]] = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: ![[#FILE2:]], isOptimized: false, runtimeVersion: 0, emissionKind: NoDebug)20; CHECK: ![[#MD1]] = !{![[#MD3]]}21 22target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"23target triple = "x86_64-scei-ps4"24 25declare i32 @foo(i32 %goo)26 27define i32 @main() {28  call i32 @foo(i32 0)29  ret i32 030}31 32!llvm.dbg.cu = !{!0}33!llvm.module.flags = !{!2, !3}34!llvm.md = !{!5}35 36; IRLinker shouldn't assert about duplicated operands.37!llvm.ident = !{!6, !6}38 39!0 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !1, enums: !4)40!1 = !DIFile(filename: "main.cpp", directory: "tmp")41!2 = !{i32 2, !"Dwarf Version", i32 4}42!3 = !{i32 2, !"Debug Info Version", i32 3}43!4 = !{}44!5 = !{!4}45!6 = !{!"foo"}46