summaryrefslogtreecommitdiffstats
path: root/llvm/test/Bitcode
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2012-09-21 14:34:31 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2012-09-21 14:34:31 +0000
commit736a4fc4fb535f4d7bc6f00124e8e391d2096c41 (patch)
treea769cd92170dd59c931737d6024c5faa6c9bbfd6 /llvm/test/Bitcode
parent443eef47efcb5b3352428dcd561078dc36f6aef1 (diff)
downloadbcm5719-llvm-736a4fc4fb535f4d7bc6f00124e8e391d2096c41.tar.gz
bcm5719-llvm-736a4fc4fb535f4d7bc6f00124e8e391d2096c41.zip
BitcodeReader: Correctly insert blockaddress constant referring to a already parsed function.
We inserted a placeholder that was never replaced because the function was already visited. Assert that all placeholders have been resolved when tearing down the bitcode reader. Fixes PR13895. llvm-svn: 164369
Diffstat (limited to 'llvm/test/Bitcode')
-rw-r--r--llvm/test/Bitcode/blockaddress.ll15
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/test/Bitcode/blockaddress.ll b/llvm/test/Bitcode/blockaddress.ll
index b9f334176ca..8ac54be00d5 100644
--- a/llvm/test/Bitcode/blockaddress.ll
+++ b/llvm/test/Bitcode/blockaddress.ll
@@ -28,3 +28,18 @@ here:
end:
ret void
}
+
+; PR13895
+define void @doitagain(i8** nocapture %pptr) {
+; CHECK: define void @doitagain
+entry:
+ br label %here
+
+here:
+ store i8* blockaddress(@doit, %here), i8** %pptr, align 8
+; CHECK: blockaddress(@doit, %here)
+ br label %end
+
+end:
+ ret void
+}
OpenPOWER on IntegriCloud