[cfe-commits] r139109 - /cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp
Richard Smith
richard-llvm at metafoo.co.uk
Sun Sep 4 16:52:04 PDT 2011
Author: rsmith
Date: Sun Sep 4 18:52:03 2011
New Revision: 139109
URL: http://llvm.org/viewvc/llvm-project?rev=139109&view=rev
Log:
PR10506: Extend test for temporary cleanups in range-based for loop to cover the dependent case.
Modified:
cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp
Modified: cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp?rev=139109&r1=139108&r2=139109&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/for-range-temporaries.cpp Sun Sep 4 18:52:03 2011
@@ -1,5 +1,6 @@
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -UDESUGAR %s | opt -instnamer -S | FileCheck %s
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -DDESUGAR %s | opt -instnamer -S | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x -emit-llvm -o - -DDESUGAR -DTEMPLATE %s | opt -instnamer -S | FileCheck %s
struct A {
A();
@@ -65,6 +66,9 @@
void body(const I &);
+#ifdef TEMPLATE
+template<typename D>
+#endif
void for_temps() {
A a;
#ifdef DESUGAR
@@ -83,7 +87,11 @@
#endif
}
-// CHECK: define void @_Z9for_tempsv()
+#ifdef TEMPLATE
+template void for_temps<D>();
+#endif
+
+// CHECK: define {{.*}}for_temps
// CHECK: call void @_ZN1AC1Ev(
// CHECK: call void @_ZN1BC1Ev(
// CHECK: call void @_ZN1CC1ERK1B(
More information about the cfe-commits
mailing list