aboutsummaryrefslogtreecommitdiffstats
path: root/test/Other
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-05-28 17:44:00 +0000
committerDan Gohman <gohman@apple.com>2010-05-28 17:44:00 +0000
commit13ec30b6a1184c590ed93d81764a0314202abeaf (patch)
tree20b6d157e37e3af96af021e4b02b67230e0d56c5 /test/Other
parent5caeff5c011d9cff5255748b5a0082bca8426554 (diff)
downloadexternal_llvm-13ec30b6a1184c590ed93d81764a0314202abeaf.zip
external_llvm-13ec30b6a1184c590ed93d81764a0314202abeaf.tar.gz
external_llvm-13ec30b6a1184c590ed93d81764a0314202abeaf.tar.bz2
Fix lint's memcpy and memmove checks, and its basic block traversal.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104970 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Other')
-rw-r--r--test/Other/lint.ll4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/Other/lint.ll b/test/Other/lint.ll
index ea02d43..bed3dba3 100644
--- a/test/Other/lint.ll
+++ b/test/Other/lint.ll
@@ -3,6 +3,7 @@ target datalayout = "e-p:64:64:64"
declare fastcc void @bar()
declare void @llvm.stackrestore(i8*)
+declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture, i8* nocapture, i64, i32, i1) nounwind
@CG = constant i32 7
@@ -54,6 +55,9 @@ define i32 @foo() noreturn {
; CHECK: Undefined behavior: Null pointer dereference
call void @llvm.stackrestore(i8* null)
+; CHECK: Write to read-only memory
+ call void @llvm.memcpy.p0i8.p0i8.i64(i8* bitcast (i32* @CG to i8*), i8* bitcast (i32* @CG to i8*), i64 1, i32 1, i1 0)
+
br label %next
next: