summaryrefslogtreecommitdiffstats
path: root/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
diff options
context:
space:
mode:
authorNico Weber <nicolasweber@gmx.de>2015-01-25 02:04:36 +0000
committerNico Weber <nicolasweber@gmx.de>2015-01-25 02:04:36 +0000
commita19d28e1d73b8e80f6cf644509e629c7f2c0cefd (patch)
treeadfe76c8bb6b019a357f2272fb71d66426b3634b /test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
parentf0fc9d7a7bf0f9787cc2ead1ef00dcb603dd1132 (diff)
Rename four test files from .C to .cpp.
lit.cfg has never supported running .C files, so these tests were never executed by check-clang. Rename them to .cpp so that they run as part of the test suite, and minorly tweak two of them that look like they were broken when checked in to actually pass. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@227029 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX/apple-kext-no-staticinit-section.cpp')
-rw-r--r--test/CodeGenCXX/apple-kext-no-staticinit-section.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp b/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
new file mode 100644
index 0000000000..0401d49179
--- /dev/null
+++ b/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -emit-llvm -o - %s | FileCheck %s
+// rdar://8825235
+/**
+1) Normally, global object construction code ends up in __StaticInit segment of text section
+ .section __TEXT,__StaticInit,regular,pure_instructions
+ In kext mode, they end up in the __text segment.
+*/
+
+class foo {
+public:
+ foo();
+ virtual ~foo();
+};
+
+foo a;
+foo b;
+foo c;
+foo::~foo() {}
+
+// CHECK-NOT: __TEXT,__StaticInit,regular,pure_instructions