[cfe-commits] r107024 - /cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp
Daniel Dunbar
daniel at zuster.org
Mon Jun 28 10:43:18 PDT 2010
Author: ddunbar
Date: Mon Jun 28 12:43:18 2010
New Revision: 107024
URL: http://llvm.org/viewvc/llvm-project?rev=107024&view=rev
Log:
tests: Rewrite test to check intent instead of implementation.
Modified:
cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp
Modified: cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp?rev=107024&r1=107023&r2=107024&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/DynArrayInit.cpp Mon Jun 28 12:43:18 2010
@@ -1,16 +1,15 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -O3 -emit-llvm -o - %s | FileCheck %s
// PR7490
-int main() {
- // CHECK: {{for.cond:|:4}}
- // CHECK: %{{.*}} = icmp ult i64 %{{.*}}, 1133
- // CHECK: {{for.body:|:6}}
- // CHECK: store i8 0
- // CHECK: br label %{{for.inc|7}}
- // CHECK: {{for.inc:|:7}}
- // CHECK: %{{.*}} = add i64 %{{.*}}, 1
- // CHECK: store i64 %{{.*}}
- // CHECK: br label %{{for.cond|4}}
- // CHECK: {{for.end:|:12}}
- volatile char *buckets = new char[1133]();
+// CHECK: define signext i8 @_Z2f0v
+// CHECK: ret i8 0
+// CHECK: }
+inline void* operator new[](unsigned long, void* __p) { return __p; }
+static void f0_a(char *a) {
+ new (a) char[4]();
+}
+char f0() {
+ char a[4];
+ f0_a(a);
+ return a[0] + a[1] + a[2] + a[3];
}
More information about the cfe-commits
mailing list