brintos

brintos / llvm-project-archived public Read only

0
0
Text · 933 B · 35dea75 Raw
34 lines · plain
1; RUN: llvm-link -S -o %t %s %p/Inputs/comdat-rm-dst.ll2; RUN: FileCheck %s < %t3; RUN: FileCheck --check-prefix=RM %s < %t4 5target datalayout = "e-m:w-p:32:32-i64:64-f80:32-n8:16:32-S32"6target triple = "i686-pc-windows-msvc"7 8$foo = comdat largest9@foo = global i32 42, comdat10; CHECK-DAG: @foo = global i64 43, comdat11 12; RM-NOT: @alias =13@alias = alias i32, ptr @foo14 15; We should arguably reject an out of comdat reference to int_alias. Given that16; the verifier accepts it, test that we at least produce an output that passes17; the verifier.18; CHECK-DAG: @int_alias = external global i3219@int_alias = internal alias i32, ptr @foo20@bar = global ptr @int_alias21 22@func_alias = alias void (), ptr @func23@zed = global ptr @func_alias24; CHECK-DAG: @zed = global ptr @func_alias25; CHECK-DAG: declare void @func_alias()26 27; RM-NOT: @func()28define void @func() comdat($foo) {29  ret void30}31 32; RM-NOT: var33@var = global i32 42, comdat($foo)34