Richard,

Two tests fail for me with -Asserts build.

    Clang :: CodeGenCXX/for-range-temporaries.cpp
    Clang :: CodeGenCXX/for-range.cpp

Due to unnamed BB.

eg.
define void @_Z9for_arrayv() nounwind {
  (snip)
  br label %6

; <label>:6                                       ; preds = %12, %0

Workaround is:

--- a/test/CodeGenCXX/for-range-temporaries.cpp
+++ b/test/CodeGenCXX/for-range-temporaries.cpp
@@ -1,5 +1,5 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x
-emit-llvm -o - -UDESUGAR %s | FileCheck %s
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x
-emit-llvm -o - -DDESUGAR %s | FileCheck %s
+// 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

 struct A {
   A();
diff --git a/test/CodeGenCXX/for-range.cpp b/test/CodeGenCXX/for-range.cpp
index 94b614f..af46644 100644
--- a/test/CodeGenCXX/for-range.cpp
+++ b/test/CodeGenCXX/for-range.cpp
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x
-emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -std=c++0x
-emit-llvm -o - %s | opt -instnamer -S | FileCheck %s

 struct A {
   A();


...Takumi


On Fri, Apr 15, 2011 at 7:09 AM, Richard Smith
<[email protected]> wrote:
> Author: rsmith
> Date: Thu Apr 14 17:09:26 2011
> New Revision: 129541
>
> URL: http://llvm.org/viewvc/llvm-project?rev=129541&view=rev
> Log:
> Add support for C++0x's range-based for loops, as specified by the C++11 
> draft standard (N3291).
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to