[PATCH] D27956: Make CodeGenCXX/stack-reuse-miscompile.cpp tolerate C++11

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Dec 19 14:43:29 PST 2016


probinson created this revision.
probinson added a reviewer: lenykholodov.
probinson added a subscriber: cfe-commits.

In this test, the allocas for the temps come out in a different order depending on whether the dialect is C++03 or C++11.  To avoid depending on the default dialect, I forced it to C++03.

I am concerned, though, because the commentary says there should be no lifetime intrinsics.  While that was true in Clang 3.8, it is no longer true in Clang 3.9, regardless of dialect.  However, the test does not actually verify that there are no lifetime intrinsics.

Is it still true that there should be no lifetime intrinsics?  If so, then there is a bug that the test has failed to detect.  If not, then the comment should be updated.


https://reviews.llvm.org/D27956

Files:
  test/CodeGenCXX/stack-reuse-miscompile.cpp


Index: test/CodeGenCXX/stack-reuse-miscompile.cpp
===================================================================
--- test/CodeGenCXX/stack-reuse-miscompile.cpp
+++ test/CodeGenCXX/stack-reuse-miscompile.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang -S -target armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -mllvm -disable-llvm-optzns -S %s -o - | FileCheck %s
+// RUN: %clang_cc1 -triple armv7l-unknown-linux-gnueabihf -emit-llvm -O1 -disable-llvm-optzns -std=c++03 %s -o - | FileCheck %s
 
 // This test should not to generate llvm.lifetime.start/llvm.lifetime.end for
 // f function because all temporary objects in this function are used for the


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D27956.82020.patch
Type: text/x-patch
Size: 644 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20161219/b86b7611/attachment.bin>


More information about the cfe-commits mailing list