]> granicus.if.org Git - clang/commitdiff
moderin objc translator: remove 'const' from remaining
authorFariborz Jahanian <fjahanian@apple.com>
Sat, 24 Mar 2012 16:53:16 +0000 (16:53 +0000)
committerFariborz Jahanian <fjahanian@apple.com>
Sat, 24 Mar 2012 16:53:16 +0000 (16:53 +0000)
fields in _class_ro_t metadata. //  rdar://11079898

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@153384 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Rewrite/RewriteModernObjC.cpp

index 43615b6ea82f61764bf80322ec9605b02239fc8f..13319701e9a44f0f70dca5a204f2642e1620f25a 100644 (file)
@@ -5305,10 +5305,10 @@ void RewriteModernObjC::RewriteIvarOffsetComputation(ObjCIvarDecl *ivar,
 /// }
 
 /// struct _class_ro_t {
-///   uint32_t const flags;
-///   uint32_t const instanceStart;
-///   uint32_t const instanceSize;
-///   uint32_t const reserved;  // only when building for 64bit targets
+///   uint32_t flags;
+///   uint32_t instanceStart;
+///   uint32_t instanceSize;
+///   uint32_t reserved;  // only when building for 64bit targets
 ///   const uint8_t *ivarLayout;
 ///   const char *name;
 ///   const struct _method_list_t *baseMethods;
@@ -5388,12 +5388,12 @@ static void WriteModernMetadataDeclarations(ASTContext *Context, std::string &Re
   Result += "};\n";
   
   Result += "\nstruct _class_ro_t {\n";
-  Result += "\tunsigned int const flags;\n";
+  Result += "\tunsigned int flags;\n";
   Result += "\tunsigned int instanceStart;\n";
-  Result += "\tunsigned int const instanceSize;\n";
+  Result += "\tunsigned int instanceSize;\n";
   const llvm::Triple &Triple(Context->getTargetInfo().getTriple());
   if (Triple.getArch() == llvm::Triple::x86_64)
-    Result += "\tunsigned int const reserved;\n";
+    Result += "\tunsigned int reserved;\n";
   Result += "\tconst unsigned char *ivarLayout;\n";
   Result += "\tconst char *name;\n";
   Result += "\tconst struct _method_list_t *baseMethods;\n";