llvm-6502/test/Linker/link-global-to-func.ll
Chris Lattner 6157e383c4 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.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53548 91177308-0d34-0410-b5e6-96231b3b80d8
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
}