summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2014-03-12 20:15:49 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2014-03-12 20:15:49 +0000
commitf3336bc1d52832a299d0530fb20071e8517bd80b (patch)
tree5cd5474e65ced36279d6bffcd33865c6045611d1 /llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
parentbfee8d49c4dcb9674fc3ae5c39f131685c516663 (diff)
downloadbcm5719-llvm-f3336bc1d52832a299d0530fb20071e8517bd80b.tar.gz
bcm5719-llvm-f3336bc1d52832a299d0530fb20071e8517bd80b.zip
Reject alias to undefined symbols in the verifier.
On ELF and COFF an alias is just another name for a position in the file. There is no way to refer to a position in another file, so an alias to undefined is meaningless. MachO currently doesn't support aliases. The spec has a N_INDR, which when implemented will have a different set of restrictions. Adding support for it shouldn't be harder than any other IR extension. For now, having the IR represent what is actually possible with current tools makes it easier to fix the design of GlobalAlias. llvm-svn: 203705
Diffstat (limited to 'llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll b/llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
index c27fe0ab6a6..7f9bd9e40dc 100644
--- a/llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
+++ b/llvm/test/Transforms/InstCombine/2007-09-10-AliasConstFold.ll
@@ -3,7 +3,9 @@
@__gthrw_pthread_cancel = alias weak i32 (i32)* @pthread_cancel ; <i32 (i32)*> [#uses=1]
@__gthread_active_ptr.5335 = internal constant i8* bitcast (i32 (i32)* @__gthrw_pthread_cancel to i8*) ; <i8**> [#uses=1]
-declare extern_weak i32 @pthread_cancel(i32)
+define weak i32 @pthread_cancel(i32) {
+ ret i32 0
+}
define i1 @__gthread_active_p() {
entry:
OpenPOWER on IntegriCloud