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


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
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to