From: Ken Dyck Date: Sat, 30 Apr 2011 16:08:27 +0000 (+0000) Subject: Replace a literal 8 with Context->getCharWidth() in X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0c4e5d6c499e926a99812a92937df587f67e8362;p=clang Replace a literal 8 with Context->getCharWidth() in SynthesizeByrefCopyDestroyHelper(). No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@130608 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Rewrite/RewriteObjC.cpp b/lib/Rewrite/RewriteObjC.cpp index 9e08afafe7..d6e34ef8fa 100644 --- a/lib/Rewrite/RewriteObjC.cpp +++ b/lib/Rewrite/RewriteObjC.cpp @@ -5057,7 +5057,7 @@ std::string RewriteObjC::SynthesizeByrefCopyDestroyHelper(VarDecl *VD, unsigned VoidPtrSize = static_cast(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 + ";