aboutsummaryrefslogtreecommitdiffstats
path: root/test/Other
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-08-02 23:06:43 +0000
committerDan Gohman <gohman@apple.com>2010-08-02 23:06:43 +0000
commita8afb2a623b8644f9460be66d99c073579e23df0 (patch)
treeb34dcf631e9bd50e823b7ee02fe7de03bfca1922 /test/Other
parent5b164b5a5cab577fdfc21b22b78b3207dbcfbcf1 (diff)
downloadexternal_llvm-a8afb2a623b8644f9460be66d99c073579e23df0.zip
external_llvm-a8afb2a623b8644f9460be66d99c073579e23df0.tar.gz
external_llvm-a8afb2a623b8644f9460be66d99c073579e23df0.tar.bz2
Add a lint check for indirectbr with no successors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110074 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/lint.ll4
1 files changed, 3 insertions, 1 deletions
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index dee3d11..fcef7ee 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -161,5 +161,7 @@ declare i32 @nonstruct_callee() nounwind
define void @struct_caller() nounwind {
entry:
call %struct bitcast (i32 ()* @foo to %struct ()*)()
- ret void
+
+ ; CHECK: Undefined behavior: indirectbr with no destinations
+ indirectbr i8* null, []
}