From d9c83e6cdfe18fc113a9408ee676c3ce89f41695 Mon Sep 17 00:00:00 2001 From: Ken Dyck Date: Sat, 30 Apr 2011 16:08:27 +0000 Subject: [PATCH] Replace a literal 8 with Context->getCharWidth() in SynthesizeByrefCopyDestroyHelper(). No change in functionality intended. llvm-svn: 130608 --- clang/lib/Rewrite/RewriteObjC.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/Rewrite/RewriteObjC.cpp b/clang/lib/Rewrite/RewriteObjC.cpp index 9e08afafe7bb..d6e34ef8fa46 100644 --- a/clang/lib/Rewrite/RewriteObjC.cpp +++ b/clang/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 + ";