summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen/X86/x86-64-pic-10.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-14 13:58:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-14 13:58:06 +0000
commit4929301af4d58c6a0e62a461b363dc3a8a856b27 (patch)
tree8c0eef89ed3088236c5a93710e33305b19544522 /llvm/test/CodeGen/X86/x86-64-pic-10.ll
parentc46f281f835fd7cf417c016d9dd64612b533f1d1 (diff)
downloadbcm5719-llvm-4929301af4d58c6a0e62a461b363dc3a8a856b27.tar.gz
bcm5719-llvm-4929301af4d58c6a0e62a461b363dc3a8a856b27.zip
Error if we see an alias to a declaration.
In ELF and COFF an alias is just another offset in a section. There is no way to represent an alias to something in another file. In MachO, the spec has the N_INDR type which should allow for exactly that, but is not currently implemented. Given that it is specified but not implemented, we error in codegen to avoid miscompiling but don't reject aliases to declarations in the verifier to leave the option open of implementing it. In the past we have used alias to declarations as a way of implementing weakref, which is why it exists in some old tests which this patch updates. llvm-svn: 194705
Diffstat (limited to 'llvm/test/CodeGen/X86/x86-64-pic-10.ll')
-rw-r--r--llvm/test/CodeGen/X86/x86-64-pic-10.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/X86/x86-64-pic-10.ll b/llvm/test/CodeGen/X86/x86-64-pic-10.ll
index 3ec172b2b65..da8082b9251 100644
--- a/llvm/test/CodeGen/X86/x86-64-pic-10.ll
+++ b/llvm/test/CodeGen/X86/x86-64-pic-10.ll
@@ -9,4 +9,6 @@ entry:
ret void
}
-declare extern_weak i32 @f()
+define weak i32 @f() {
+ ret i32 42
+}
OpenPOWER on IntegriCloud