summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
authorNaomi Musgrave <nmusgrave@google.com>2015-07-30 17:59:52 +0000
committerNaomi Musgrave <nmusgrave@google.com>2015-07-30 17:59:52 +0000
commit690132b344214d3105c8ea7a7e7715927942528b (patch)
tree8b9e3f817c10a7983059798c4dd0a3ff01818e51 /clang/test
parent3d451678f82bf762103a1fce47fa31c9b3b8e47f (diff)
downloadbcm5719-llvm-690132b344214d3105c8ea7a7e7715927942528b.tar.gz
bcm5719-llvm-690132b344214d3105c8ea7a7e7715927942528b.zip
Testing to verify function attribute disable-tail-calls applied to destructor
llvm-svn: 243671
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/CodeGenCXX/sanitize-dtor-tail-call.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/sanitize-dtor-tail-call.cpp b/clang/test/CodeGenCXX/sanitize-dtor-tail-call.cpp
index 14422ba4281..bfbf04dcbd5 100644
--- a/clang/test/CodeGenCXX/sanitize-dtor-tail-call.cpp
+++ b/clang/test/CodeGenCXX/sanitize-dtor-tail-call.cpp
@@ -1,4 +1,5 @@
// Test -fsanitize-memory-use-after-dtor
+// RUN: %clang_cc1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++11 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
// RUN: %clang_cc1 -O1 -fsanitize=memory -fsanitize-memory-use-after-dtor -disable-llvm-optzns -std=c++11 -triple=x86_64-pc-linux -emit-llvm -o - %s | FileCheck %s
struct Simple {
@@ -17,3 +18,7 @@ Simple s;
// CHECK: {{^ *}}call void @__sanitizer_dtor_callback
// CHECK-NOT: tail call void @__sanitizer_dtor_callback
// CHECK: ret void
+
+// Destructor does not emit any tail calls
+// CHECK: attributes #1 = {{.*("disable-tail-calls"="true").*}}
+// CHECK: }{{$}}
OpenPOWER on IntegriCloud