aboutsummaryrefslogtreecommitdiff
path: root/lib/Rewrite/RewriteObjC.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-04-30 16:08:27 +0000
committerKen Dyck <kd@kendyck.com>2011-04-30 16:08:27 +0000
commit0c4e5d6c499e926a99812a92937df587f67e8362 (patch)
treef9c09ee6c6b12e018c1b82694f4652e651129947 /lib/Rewrite/RewriteObjC.cpp
parent25df423cfc6689cf21d51a66af84ea1e70d489df (diff)
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
Diffstat (limited to 'lib/Rewrite/RewriteObjC.cpp')
-rw-r--r--lib/Rewrite/RewriteObjC.cpp2
1 files changed, 1 insertions, 1 deletions
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<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 + ";