File tree 2 files changed +36
-1
lines changed 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change @@ -2207,7 +2207,7 @@ void CGObjCGNU::GenerateClass(const ObjCImplementationDecl *OID) {
2207
2207
IvarNames.push_back (MakeConstantString (IVD->getNameAsString ()));
2208
2208
// Get the type encoding for this ivar
2209
2209
std::string TypeStr;
2210
- Context.getObjCEncodingForType (IVD->getType (), TypeStr);
2210
+ Context.getObjCEncodingForType (IVD->getType (), TypeStr, IVD );
2211
2211
IvarTypes.push_back (MakeConstantString (TypeStr));
2212
2212
// Get the offset
2213
2213
uint64_t BaseOffset = ComputeIvarBaseOffset (CGM, OID, IVD);
Original file line number Diff line number Diff line change
1
+ // RUN: %clang_cc1 -S -emit-llvm -fobjc-runtime=gcc -o - %s | FileCheck %s
2
+
3
+ @protocol NSCopying
4
+ @end
5
+
6
+ @interface NSObject {
7
+ struct objc_object *isa;
8
+ }
9
+ + (id ) new ;
10
+ - (id ) init ;
11
+ @end
12
+
13
+ @interface NSString : NSObject <NSCopying >
14
+ + (NSString *)foo ;
15
+ @end
16
+
17
+ @interface TestClass : NSObject {
18
+ @public
19
+ NSString *_stringIvar;
20
+ int _intIvar;
21
+ }
22
+ @end
23
+ @implementation TestClass
24
+
25
+ @end
26
+
27
+ int main () {
28
+ TestClass *c = [TestClass new ];
29
+ return 0 ;
30
+ }
31
+
32
+ // CHECK: @0 = private unnamed_addr constant [12 x i8] c"_stringIvar\00"
33
+ // CHECK: @1 = private unnamed_addr constant [12 x i8] c"@\22NSString\22\00"
34
+ // CHECK: @2 = private unnamed_addr constant [9 x i8] c"_intIvar\00"
35
+ // CHECK: @3 = private unnamed_addr constant [2 x i8] c"i\00"
You can’t perform that action at this time.
0 commit comments