]> granicus.if.org Git - clang/commitdiff
Replace a literal 8 with Context->getCharWidth() in
authorKen Dyck <kd@kendyck.com>
Sat, 30 Apr 2011 16:08:27 +0000 (16:08 +0000)
committerKen Dyck <kd@kendyck.com>
Sat, 30 Apr 2011 16:08:27 +0000 (16:08 +0000)
SynthesizeByrefCopyDestroyHelper(). No change in functionality intended.

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

lib/Rewrite/RewriteObjC.cpp

index 9e08afafe7bb99b8a3be73e7380545f3c7ba69da..d6e34ef8fa46f96706ae874cc932ede484883ffe 100644 (file)
@@ -5057,7 +5057,7 @@ std::string RewriteObjC::SynthesizeByrefCopyDestroyHelper(VarDecl *VD,
   unsigned VoidPtrSize = 
   static_cast<unsigned>(Context->getTypeSize(Context->VoidPtrTy));
   
-  unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/8;
+  unsigned offset = (VoidPtrSize*4 + IntSize + IntSize)/Context->getCharWidth();
   S += " _Block_object_assign((char*)dst + ";
   S += utostr(offset);
   S += ", *(void * *) ((char*)src + ";