CodeGenCXX/captured-statements.cpp test fails on Linux PowerPC 64

Hi,

I got the following on openSUSE 13.1 PPC64:

[58620s] ******************** TEST ‘Clang :: CodeGenCXX/captured-statements.cpp’ FAILED ********************
[58620s] Script:
[58620s] –
[58620s] /home/abuild/rpmbuild/BUILD/llvm/stage2/Release/bin/clang -cc1 -internal-isystem /home/abuild/rpmbuild/BUILD/llvm/stage2/Release/bin/…/lib64/clang/3.4/include -std=c++11 -emit-llvm /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -o /home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-1
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-2
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-3
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-4
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-5
[58620s] FileCheck /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp -input-file=/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp -check-prefix=CHECK-6
[58620s] –
[58620s] Exit Code: 1
[58620s] Command Output (stderr):
[58620s] –
[58620s] /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/CodeGenCXX/captured-statements.cpp:58:14: error: expected string not found in input
[58620s] // CHECK-2: call i32 @[[Lambda:["$\w]+]]
[58620s] ^
[58620s] /home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp:54:23: note: scanning from here
[58620s] define void @_Z5test2i(i32 signext %x) #0 {
[58620s] ^
[58620s] /home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/CodeGenCXX/Output/captured-statements.cpp.tmp:55:11: note: possible intended match here
[58620s] %1 = alloca i32, align 4
[58620s] ^
[58620s] –
[58620s]

Any ideas?

Thanks!

I was able to reproduce this by setting -triple=powerpc64-unknown-linux-gnu. I’ve attached a patch that should fix the problem – could someone give this a quick review?

Thanks,

Ben

fix-capturedstmt-codegen-powerpc.patch (1.26 KB)

LGTM.

Committed as r181707.

Ben