diff options
author | Chris Lattner <sabre@nondot.org> | 2011-08-03 06:15:41 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-08-03 06:15:41 +0000 |
commit | fb5179a2fa3372813ea9568ad0073223c8e0393c (patch) | |
tree | 7bacee0bdece9af66055c98d86a504805f74f696 /test | |
parent | 027cbf9329854e6b02d8db36cbe4f361ee0038cd (diff) | |
download | external_llvm-fb5179a2fa3372813ea9568ad0073223c8e0393c.zip external_llvm-fb5179a2fa3372813ea9568ad0073223c8e0393c.tar.gz external_llvm-fb5179a2fa3372813ea9568ad0073223c8e0393c.tar.bz2 |
fix PR10286, a problem with the .ll printer handling block addresses that are out-of-scope.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136768 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/Transforms/StripSymbols/block-address.ll | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/Transforms/StripSymbols/block-address.ll b/test/Transforms/StripSymbols/block-address.ll new file mode 100644 index 0000000..d22c6b1 --- /dev/null +++ b/test/Transforms/StripSymbols/block-address.ll @@ -0,0 +1,23 @@ +; RUN: opt %s -strip -S | FileCheck %s +; PR10286 + +@main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %FOO), i8* blockaddress(@f, %BAR)] +; CHECK: @main_addrs = constant [2 x i8*] [i8* blockaddress(@f, %2), i8* blockaddress(@f, %3)] + +declare void @foo() nounwind +declare void @bar() nounwind + +define void @f(i8* %indirect.goto.dest) nounwind uwtable ssp { +entry: + indirectbr i8* %indirect.goto.dest, [label %FOO, label %BAR] + + ; CHECK: indirectbr i8* %0, [label %2, label %3] + +FOO: + call void @foo() + ret void + +BAR: + call void @bar() + ret void +} |