1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-01 16:33:37 +01:00
llvm-mirror/test/Linker/link-global-to-func.ll
Chris Lattner ef7178406b Reimplement LinkFunctionProtos in terms of GetLinkageResult. This fixes
the second half of link-global-to-func.ll and causes some minor changes in
messages.

There are two TODOs here.  First, this causes a regression in 
2008-07-06-AliasWeakDest.ll, which is now failing (so I xfailed it).  Anton,
I would really appreciate it if you could take a look at this.  It should be
a matter of adding proper alias support to GetLinkageResult, and was probably
already a latent bug that would manifest with globals.

The second todo is to reimplement LinkAlias in the same pattern as 
function and global linking.  This should be pretty straight-forward for 
someone who knows aliases, but isn't a requirement for correctness.

llvm-svn: 53548
2008-07-14 07:23:24 +00:00

14 lines
538 B
LLVM

; RUN: llvm-as %s -o %t1.bc -f
; RUN: echo {declare void @__eprintf(i8*, i8*, i32, i8*) noreturn define void @foo() { tail call void @__eprintf( i8* undef, i8* undef, i32 4, i8* null ) noreturn nounwind unreachable }} | llvm-as -o %t2.bc -f
; RUN: llvm-link %t2.bc %t1.bc -o - | llvm-dis | grep __eprintf
; RUN: llvm-link %t1.bc %t2.bc -o - | llvm-dis | grep __eprintf
; rdar://6072702
@__eprintf = external global i8* ; <i8**> [#uses=1]
define i8* @test() {
%A = load i8** @__eprintf ; <i8*> [#uses=1]
ret i8* %A
}