summaryrefslogtreecommitdiffstats
path: root/libcxxabi/test
diff options
context:
space:
mode:
authorBen Craig <ben.craig@codeaurora.org>2016-03-04 14:25:13 +0000
committerBen Craig <ben.craig@codeaurora.org>2016-03-04 14:25:13 +0000
commit5d78477ba12df0c924d2d9aa5efafc52e1b62cd8 (patch)
tree2831cb3779dbcd0a9686a4f43ac030ac2bc14034 /libcxxabi/test
parent6c3856d850714bbd88260d08691e71fb40b5a5e6 (diff)
downloadbcm5719-llvm-5d78477ba12df0c924d2d9aa5efafc52e1b62cd8.tar.gz
bcm5719-llvm-5d78477ba12df0c924d2d9aa5efafc52e1b62cd8.zip
Reducing stack usage of test
This test has a lot of classes with large amounts of manually inserted padding in them, presumably to prevent various optimizations. The test then creates lots of these objects on the stack. On embedded targets, this was usually enough to overflow the stack. I moved the objects to global / namespace scope. Since the tests are each in their own namespace, there should be no cross-test conflicts. llvm-svn: 262717
Diffstat (limited to 'libcxxabi/test')
-rw-r--r--libcxxabi/test/dynamic_cast14.pass.cpp72
1 files changed, 36 insertions, 36 deletions
diff --git a/libcxxabi/test/dynamic_cast14.pass.cpp b/libcxxabi/test/dynamic_cast14.pass.cpp
index c929e38f6ec..8bf0ba50ca8 100644
--- a/libcxxabi/test/dynamic_cast14.pass.cpp
+++ b/libcxxabi/test/dynamic_cast14.pass.cpp
@@ -213,20 +213,20 @@ struct A13
A13* getA13() {return this;}
};
+A3 a3;
+A4 a4;
+A5 a5;
+A6 a6;
+A7 a7;
+A8 a8;
+A9 a9;
+A10 a10;
+A11 a11;
+A12 a12;
+A13 a13;
+
void test()
{
- A3 a3;
- A4 a4;
- A5 a5;
- A6 a6;
- A7 a7;
- A8 a8;
- A9 a9;
- A10 a10;
- A11 a11;
- A12 a12;
- A13 a13;
-
assert(dynamic_cast<A3*>(a3.getA1_3()) == a3.getA3());
assert(dynamic_cast<A3*>(a3.getA2()) == a3.getA3());
@@ -934,20 +934,20 @@ struct A13
A13* getA13() {return this;}
};
+A3 a3;
+A4 a4;
+A5 a5;
+A6 a6;
+A7 a7;
+A8 a8;
+A9 a9;
+A10 a10;
+A11 a11;
+A12 a12;
+A13 a13;
+
void test()
{
- A3 a3;
- A4 a4;
- A5 a5;
- A6 a6;
- A7 a7;
- A8 a8;
- A9 a9;
- A10 a10;
- A11 a11;
- A12 a12;
- A13 a13;
-
assert(dynamic_cast<A3*>(a3.getA1_3()) == 0);
assert(dynamic_cast<A3*>(a3.getA2()) == a3.getA3());
@@ -1655,20 +1655,20 @@ struct A13
A13* getA13() {return this;}
};
+A3 a3;
+A4 a4;
+A5 a5;
+A6 a6;
+A7 a7;
+A8 a8;
+A9 a9;
+A10 a10;
+A11 a11;
+A12 a12;
+A13 a13;
+
void test()
{
- A3 a3;
- A4 a4;
- A5 a5;
- A6 a6;
- A7 a7;
- A8 a8;
- A9 a9;
- A10 a10;
- A11 a11;
- A12 a12;
- A13 a13;
-
assert(dynamic_cast<A3*>(a3.getA1_3()) == a3.getA3());
assert(dynamic_cast<A3*>(a3.getA2()) == 0);
OpenPOWER on IntegriCloud