r243671 - Testing to verify function attribute disable-tail-calls applied to destructor
Naomi Musgrave
nmusgrave at google.com
Thu Jul 30 10:59:52 PDT 2015
Author: nmusgrave
Date: Thu Jul 30 12:59:52 2015
New Revision: 243671
URL: http://llvm.org/viewvc/llvm-project?rev=243671&view=rev
Log:
Testing to verify function attribute disable-tail-calls applied to destructor
Modified:
cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp
Modified: cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp?rev=243671&r1=243670&r2=243671&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/sanitize-dtor-tail-call.cpp Thu Jul 30 12:59:52 2015
@@ -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: }{{$}}
More information about the cfe-commits
mailing list