aboutsummaryrefslogtreecommitdiff
path: root/test/Other
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-26 22:21:25 +0000
committerDan Gohman <gohman@apple.com>2010-05-26 22:21:25 +0000
commit882ddb492d9d5497514ac5c084686f07716115e8 (patch)
treec80eb03d7dc1eafb2a29a603bc9a5b39338e041c /test/Other
parent6f0ff1d578cfa333164e806c2290f02dd5ebebd1 (diff)
Reinstate checking of stackrestore, with checking for both Read
and Write, and add a comment explaining this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104756 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/lint.ll3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index eb0b7629e4..1f9efe3ad9 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -2,6 +2,7 @@
target datalayout = "e-p:64:64:64"
declare fastcc void @bar()
+declare void @llvm.stackrestore(i8*)
@CG = constant i32 7
@@ -50,6 +51,8 @@ define i32 @foo() noreturn {
%lb = load i32* bitcast (i8* blockaddress(@foo, %next) to i32*)
; CHECK: Call to block address
call void()* bitcast (i8* blockaddress(@foo, %next) to void()*)()
+; CHECK: Undefined behavior: Null pointer dereference
+ call void @llvm.stackrestore(i8* null)
br label %next