summaryrefslogtreecommitdiffstats
path: root/clang/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
commita24b299c00792093910f77eb10c01035bca91bb0 (patch)
treef763c897b61e959b58251e92d8b3f9f9dd96b01f /clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
parent9f7ae2c9484431ad9caa4357b5109f90c166edd0 (diff)
downloadbcm5719-llvm-a24b299c00792093910f77eb10c01035bca91bb0.tar.gz
bcm5719-llvm-a24b299c00792093910f77eb10c01035bca91bb0.zip
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. llvm-svn: 227029
Diffstat (limited to 'clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp')
-rw-r--r--clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp b/clang/test/CodeGenCXX/apple-kext-no-staticinit-section.cpp
new file mode 100644
index 00000000000..0401d491790
--- /dev/null
+++ b/clang/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
OpenPOWER on IntegriCloud