| 1 |
// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -fapple-kext -fno-rtti -disable-O0-optnone -emit-llvm -o - %s | FileCheck %s |
| 2 |
/** |
| 3 |
1) Normally, global object construction code ends up in __StaticInit segment of text section |
| 4 |
.section __TEXT,__StaticInit,regular,pure_instructions |
| 5 |
In kext mode, they end up in the __text segment. |
| 6 |
*/ |
| 7 |
|
| 8 |
class foo { |
| 9 |
public: |
| 10 |
foo(); |
| 11 |
virtual ~foo(); |
| 12 |
}; |
| 13 |
|
| 14 |
foo a; |
| 15 |
foo b; |
| 16 |
foo c; |
| 17 |
foo::~foo() {} |
| 18 |
|
| 19 |
// CHECK-NOT: __TEXT,__StaticInit,regular,pure_instructions |