1 // RUN: %clang_cc1 -E %s -o %t.mm
2 // RUN: %clang_cc1 -x objective-c++ -fblocks -fms-extensions -rewrite-objc %t.mm -o - | FileCheck %s
12 @interface Sub : NSObject {
21 - (id) MyNSString { return subIvar ? PrivateIvar : nsstring; }
24 @interface NSString @end
25 @implementation NSString @end
27 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" __declspec(dllimport) unsigned long OBJC_IVAR_$_Sub$subIvar;
28 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" unsigned long OBJC_IVAR_$_Sub$PrivateIvar;
29 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" __declspec(dllimport) unsigned long OBJC_IVAR_$_Sub$nsstring;
30 // CHECK: #pragma warning(disable:4273)
31 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" __declspec(dllexport) unsigned long int OBJC_IVAR_$_Sub$subIvar
32 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" __declspec(dllexport) unsigned long int OBJC_IVAR_$_Sub$nsstring
33 // CHECK: __declspec(allocate(".objc_ivar$B")) extern "C" unsigned long int OBJC_IVAR_$_Sub$PrivateIvar
34 // CHECK: extern "C" __declspec(dllimport) struct _class_t OBJC_METACLASS_$_NSObject;
35 // CHECK: extern "C" __declspec(dllexport) struct _class_t OBJC_METACLASS_$_Sub
36 // CHECK: extern "C" __declspec(dllimport) struct _class_t OBJC_CLASS_$_NSObject;
37 // CHECK: extern "C" __declspec(dllexport) struct _class_t OBJC_CLASS_$_Sub
38 // CHECK: extern "C" __declspec(dllexport) struct _class_t OBJC_CLASS_$_NSString;
39 // CHECK: extern "C" __declspec(dllexport) struct _class_t OBJC_METACLASS_$_NSString
40 // CHECK: extern "C" __declspec(dllexport) struct _class_t OBJC_CLASS_$_NSString