aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorKen Dyck <kd@kendyck.com>2011-04-07 12:37:09 +0000
committerKen Dyck <kd@kendyck.com>2011-04-07 12:37:09 +0000
commit14c65ca4cd914f3090d7eedb9bff4deb0ffc7927 (patch)
tree7563611aee16771c85f064b44270d2792b974ed2 /lib/CodeGen/CGClass.cpp
parent737d5447b5d20633992ee5388eca5270c28c8ae7 (diff)
[Reapply r128776, modified so that it does not break debug info.]
Change the return type of CodeGenVTables::getVirtualBaseOffsetOffset() to CharUnits. No change in functionality intended. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@129072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index 30f96efd79..ce41e84569 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -1317,11 +1317,12 @@ CodeGenFunction::GetVirtualBaseClassOffset(llvm::Value *This,
const CXXRecordDecl *ClassDecl,
const CXXRecordDecl *BaseClassDecl) {
llvm::Value *VTablePtr = GetVTablePtr(This, Int8PtrTy);
- int64_t VBaseOffsetOffset =
+ CharUnits VBaseOffsetOffset =
CGM.getVTables().getVirtualBaseOffsetOffset(ClassDecl, BaseClassDecl);
llvm::Value *VBaseOffsetPtr =
- Builder.CreateConstGEP1_64(VTablePtr, VBaseOffsetOffset, "vbase.offset.ptr");
+ Builder.CreateConstGEP1_64(VTablePtr, VBaseOffsetOffset.getQuantity(),
+ "vbase.offset.ptr");
const llvm::Type *PtrDiffTy =
ConvertType(getContext().getPointerDiffType());