]> granicus.if.org Git - clang/commitdiff
Do the encoding of ivar types in the ivar metadata.
authorFariborz Jahanian <fjahanian@apple.com>
Mon, 29 Oct 2007 17:16:25 +0000 (17:16 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Mon, 29 Oct 2007 17:16:25 +0000 (17:16 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43454 91177308-0d34-0410-b5e6-96231b3b80d8

Driver/RewriteTest.cpp

index 0c303daddf2f96b94d4722d8b08ba88f6d23369f..45dde83375535a2919bd2e6fcd735b6cb4b1ec83 100644 (file)
@@ -836,15 +836,21 @@ void RewriteTest::RewriteObjcClassMetaData(ObjcImplementationDecl *IDecl,
                              : CDecl->getIntfDeclIvars();
     Result += "\t,{{\"";
     Result += Ivars[0]->getName();
-    Result += "\", \"\", ";
+    Result += "\", \"";
+    std::string StrEncoding;
+    Context->getObjcEncodingForType(Ivars[0]->getType(), StrEncoding);
+    Result += StrEncoding;
+    Result += "\", ";
     SynthesizeIvarOffsetComputation(IDecl, Ivars[0], Result);
     Result += "}\n";
     for (int i = 1; i < NumIvars; i++) {
-      // TODO: 1) ivar names may have to go to another section. 2) encode
-      // ivar_type type of each ivar .
       Result += "\t  ,{\"";
       Result += Ivars[i]->getName();
-      Result += "\", \"\", ";
+      Result += "\", \"";
+      std::string StrEncoding;
+      Context->getObjcEncodingForType(Ivars[i]->getType(), StrEncoding);
+      Result += StrEncoding;
+      Result += "\", ";
       SynthesizeIvarOffsetComputation(IDecl, Ivars[i], Result);
       Result += "}\n";
     }