[cfe-commits] r129541 - in /cfe/trunk: include/clang/AST/ include/clang/Analysis/Visitors/ include/clang/Basic/ include/clang/Parse/ include/clang/Sema/ include/clang/Serialization/ lib/AST/ lib/Analysis/ lib/CodeGen/ lib/Parse/ lib/Sema/ lib/Ser

Richard Smith richard at metafoo.co.uk
Fri Apr 15 03:25:52 PDT 2011


Hi,

On Fri, April 15, 2011 04:37, NAKAMURA Takumi wrote:
> 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
[...]

Thanks for pointing this out! It's a bit surprising to me that +Asserts
and -Asserts produce different IR, and that unnamed IR labels are
formatted differently.

Your workaround seems like the best fix to me; I've checked it in as r129562.

Thanks!
Richard





More information about the cfe-commits mailing list