[llvm-branch-commits] [cfe-branch] r80546 - in /cfe/branches/release_26: lib/Sema/TreeTransform.h test/CodeGen/blocks-seq.c test/CodeGen/x86_64-arguments.c test/CodeGenCXX/member-pointers-zero-init.cpp

Tanya Lattner tonic at nondot.org
Sun Aug 30 23:21:04 PDT 2009


Author: tbrethou
Date: Mon Aug 31 01:21:04 2009
New Revision: 80546

URL: http://llvm.org/viewvc/llvm-project?rev=80546&view=rev
Log:
Merge from mainline.
Fix a few tests to be -Asserts agnostic.
- Ugh.
fix a GCC type punning warning.

Modified:
    cfe/branches/release_26/lib/Sema/TreeTransform.h
    cfe/branches/release_26/test/CodeGen/blocks-seq.c
    cfe/branches/release_26/test/CodeGen/x86_64-arguments.c
    cfe/branches/release_26/test/CodeGenCXX/member-pointers-zero-init.cpp

Modified: cfe/branches/release_26/lib/Sema/TreeTransform.h
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_26/lib/Sema/TreeTransform.h?rev=80546&r1=80545&r2=80546&view=diff

==============================================================================
--- cfe/branches/release_26/lib/Sema/TreeTransform.h (original)
+++ cfe/branches/release_26/lib/Sema/TreeTransform.h Mon Aug 31 01:21:04 2009
@@ -1164,13 +1164,11 @@
                                                 SourceLocation LParenLoc,
                                                 ExprArg SubExpr,
                                                 SourceLocation RParenLoc) {
-    Expr *Sub = SubExpr.takeAs<Expr>();
+    void *Sub = SubExpr.takeAs<Expr>();
     return getSema().ActOnCXXTypeConstructExpr(TypeRange,
                                                T.getAsOpaquePtr(),
                                                LParenLoc,
-                                               Sema::MultiExprArg(getSema(),
-                                                                  (void **)&Sub,
-                                                                  1),
+                                         Sema::MultiExprArg(getSema(), &Sub, 1),
                                                /*CommaLocs=*/0, 
                                                RParenLoc);
   }

Modified: cfe/branches/release_26/test/CodeGen/blocks-seq.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_26/test/CodeGen/blocks-seq.c?rev=80546&r1=80545&r2=80546&view=diff

==============================================================================
--- cfe/branches/release_26/test/CodeGen/blocks-seq.c (original)
+++ cfe/branches/release_26/test/CodeGen/blocks-seq.c Mon Aug 31 01:21:04 2009
@@ -1,13 +1,15 @@
-// RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm -o %t %s &&
-// RUN: grep '%call = call i32 (...)\* @rhs()' %t | count 1 &&
-// If this fails, see about sliding %4, %5, %6 and %7...
-// RUN: grep '%forwarding1 = getelementptr inbounds %0\* %i, i32 0, i32 1' %t | count 1 &&
-// RUN: grep '%4 = bitcast i8\*\* %forwarding1 to %0\*\*' %t | count 1 &&
-// RUN: grep '%5 = load %0\*\* %4' %t | count 1 &&
-// RUN: grep '%call2 = call i32 (...)\* @rhs()' %t | count 1 &&
-// RUN: grep '%forwarding3 = getelementptr inbounds %0\* %i, i32 0, i32 1' %t | count 1 &&
-// RUN: grep '%6 = bitcast i8\*\* %forwarding3 to %0\*\*' %t | count 1 &&
-// RUN: grep '%7 = load %0\*\* %6' %t | count 1
+// FIXME: We forcibly strip the names so that the test doesn't vary between
+// builds with and without asserts. We need a better solution for this.
+
+// RUN: clang-cc -fblocks -triple x86_64-apple-darwin10 -emit-llvm-bc -o - %s | opt -strip | llvm-dis > %t &&
+// RUN: grep '%7 = call i32 (...)\* @rhs()' %t | count 1 &&
+// RUN: grep '%8 = getelementptr inbounds %0\* %1, i32 0, i32 1' %t | count 1 &&
+// RUN: grep '%9 = bitcast i8\*\* %8 to %0\*\*' %t | count 1 &&
+// RUN: grep '%10 = load %0\*\* %9' %t | count 1 &&
+// RUN: grep '%12 = call i32 (...)\* @rhs()' %t | count 1 &&
+// RUN: grep '%13 = getelementptr inbounds %0\* %1, i32 0, i32 1' %t | count 1 &&
+// RUN: grep '%14 = bitcast i8\*\* %13 to %0\*\*' %t | count 1 &&
+// RUN: grep '%15 = load %0\*\* %14' %t | count 1
 
 int rhs();
 

Modified: cfe/branches/release_26/test/CodeGen/x86_64-arguments.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_26/test/CodeGen/x86_64-arguments.c?rev=80546&r1=80545&r2=80546&view=diff

==============================================================================
--- cfe/branches/release_26/test/CodeGen/x86_64-arguments.c (original)
+++ cfe/branches/release_26/test/CodeGen/x86_64-arguments.c Mon Aug 31 01:21:04 2009
@@ -72,8 +72,9 @@
 // RUN: grep 'define void @f13(.struct.s13_0. noalias sret .agg.result, i32 .a, i32 .b, i32 .c, i32 .d, .struct.s13_1. byval .e, i32 .f)' %t &&
 
 struct s13_0 { long long f0[3]; };
+struct s13_1 { long long f0[2]; };
 struct s13_0 f13(int a, int b, int c, int d, 
-                 struct s13_1 { long long f0[2]; } e, int f) { while (1) {} }
+                 struct s13_1 e, int f) { while (1) {} }
 
 // RUN: grep 'define void @f14(.*, i8 signext .X)' %t &&
 void f14(int a, int b, int c, int d, int e, int f, 
@@ -89,9 +90,10 @@
          long double X) {}
 
 // Check for valid coercion.
-// RUN: grep '.1 = bitcast i64. .tmp to .struct.f18_s0.' %t &&
-// RUN: grep '.2 = load .struct.f18_s0. .1, align 1' %t &&
-// RUN: grep 'store .struct.f18_s0 .2, .struct.f18_s0. .f18_arg1' %t &&
-void f18(int a, struct f18_s0 { int f0; } f18_arg1) { while (1) {} }
+// RUN: grep '.. = bitcast i64. .* to .struct.f18_s0.' %t &&
+// RUN: grep '.. = load .struct.f18_s0. .., align 1' %t &&
+// RUN: grep 'store .struct.f18_s0 .., .struct.f18_s0. .f18_arg1' %t &&
+struct f18_s0 { int f0; };
+void f18(int a, struct f18_s0 f18_arg1) { while (1) {} }
 
 // RUN: true

Modified: cfe/branches/release_26/test/CodeGenCXX/member-pointers-zero-init.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_26/test/CodeGenCXX/member-pointers-zero-init.cpp?rev=80546&r1=80545&r2=80546&view=diff

==============================================================================
--- cfe/branches/release_26/test/CodeGenCXX/member-pointers-zero-init.cpp (original)
+++ cfe/branches/release_26/test/CodeGenCXX/member-pointers-zero-init.cpp Mon Aug 31 01:21:04 2009
@@ -14,7 +14,7 @@
 int A::* aaa[2][2];
 
 void f() {
-  // RUN: grep "%.obool = icmp ne i64 %.mp, -1" %t
+  // RUN: grep "%.* = icmp ne i64 %.*, -1" %t
   if (a) { }
   
   // FIXME: This doesn't yet work





More information about the llvm-branch-commits mailing list