summaryrefslogtreecommitdiff
path: root/test/Instrumentation/AddressSanitizer
diff options
context:
space:
mode:
authorKostya Serebryany <kcc@google.com>2012-11-29 08:57:20 +0000
committerKostya Serebryany <kcc@google.com>2012-11-29 08:57:20 +0000
commit5085eb80abe29320fa8922c10b36249f5163f45d (patch)
treeba17b40c787eccc25fea234bc7970f92cb28957b /test/Instrumentation/AddressSanitizer
parenta18d377e73d3dd96233011e9da9789861fb8f315 (diff)
downloadllvm-5085eb80abe29320fa8922c10b36249f5163f45d.tar.gz
llvm-5085eb80abe29320fa8922c10b36249f5163f45d.tar.bz2
llvm-5085eb80abe29320fa8922c10b36249f5163f45d.tar.xz
[asan] when checking the noreturn attribute on the call, also check it on the callee
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168861 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Instrumentation/AddressSanitizer')
-rw-r--r--test/Instrumentation/AddressSanitizer/instrument-no-return.ll15
1 files changed, 13 insertions, 2 deletions
diff --git a/test/Instrumentation/AddressSanitizer/instrument-no-return.ll b/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
index 80f1b1c74c..e8f62b5485 100644
--- a/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
+++ b/test/Instrumentation/AddressSanitizer/instrument-no-return.ll
@@ -7,11 +7,22 @@ target triple = "x86_64-unknown-linux-gnu"
declare void @MyNoReturnFunc(i32) noreturn
-define i32 @_Z5ChildPv(i8* nocapture %arg) uwtable address_safety {
+define i32 @Call1(i8* nocapture %arg) uwtable address_safety {
entry:
- call void @MyNoReturnFunc(i32 1) noreturn
+ call void @MyNoReturnFunc(i32 1) noreturn ; The call insn has noreturn attr.
+; CHECK: @Call1
+; CHECK: call void @__asan_handle_no_return
+; CHECK-NEXT: call void @MyNoReturnFunc
+; CHECK-NEXT: unreachable
unreachable
}
+define i32 @Call2(i8* nocapture %arg) uwtable address_safety {
+entry:
+ call void @MyNoReturnFunc(i32 1) ; No noreturn attribure on the call.
+; CHECK: @Call2
; CHECK: call void @__asan_handle_no_return
; CHECK-NEXT: call void @MyNoReturnFunc
+; CHECK-NEXT: unreachable
+ unreachable
+}