diff options
author | Ken Dyck <kd@kendyck.com> | 2011-04-07 12:37:09 +0000 |
---|---|---|
committer | Ken Dyck <kd@kendyck.com> | 2011-04-07 12:37:09 +0000 |
commit | bb4e977218dbc610d8fc9e475e46c8bc3ee07da1 (patch) | |
tree | 781084ac6771ef83c9424039c5df7b8449d8bc12 /clang/lib/CodeGen/CGClass.cpp | |
parent | f6e259049dab79b42142853f51af06eb8e222de7 (diff) | |
download | bcm5719-llvm-bb4e977218dbc610d8fc9e475e46c8bc3ee07da1.tar.gz bcm5719-llvm-bb4e977218dbc610d8fc9e475e46c8bc3ee07da1.zip |
[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.
llvm-svn: 129072
Diffstat (limited to 'clang/lib/CodeGen/CGClass.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index 30f96efd79a..ce41e845697 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/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()); |