summaryrefslogtreecommitdiff
path: root/test/Assembler
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2012-10-11 00:38:25 +0000
committerNick Lewycky <nicholas@mxc.ca>2012-10-11 00:38:25 +0000
commit64ea275fe4e85f112ccfaf9c7b56fe64e11c771f (patch)
tree3528d07725139915c84087c2453458d8916dac58 /test/Assembler
parenta395f4df5b6d9c2feb661091ca75be2500d07cb0 (diff)
downloadllvm-64ea275fe4e85f112ccfaf9c7b56fe64e11c771f.tar.gz
llvm-64ea275fe4e85f112ccfaf9c7b56fe64e11c771f.tar.bz2
llvm-64ea275fe4e85f112ccfaf9c7b56fe64e11c771f.tar.xz
Don't crash if a .ll file contains a forward-reference that looks like a global
value but later turns out to be a function. Unfortunately, we can't fold tests into a single file because we only get one error out of llvm-as. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165680 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Assembler')
-rw-r--r--test/Assembler/invalid-fwdref1.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Assembler/invalid-fwdref1.ll b/test/Assembler/invalid-fwdref1.ll
new file mode 100644
index 0000000000..ef8b16cadc
--- /dev/null
+++ b/test/Assembler/invalid-fwdref1.ll
@@ -0,0 +1,4 @@
+; RUN: not llvm-as %s -disable-output 2>&1 | grep "invalid forward reference to function as global value!"
+
+define i8* @test1() { ret i8* @test1a }
+define void @test1a() { }