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 | 14c65ca4cd914f3090d7eedb9bff4deb0ffc7927 (patch) | |
tree | 7563611aee16771c85f064b44270d2792b974ed2 /lib/CodeGen/CGDebugInfo.cpp | |
parent | 737d5447b5d20633992ee5388eca5270c28c8ae7 (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/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 1efd82e11d..17fc47820c 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -814,10 +814,13 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DIFile Unit, if (BI->isVirtual()) { // virtual base offset offset is -ve. The code generator emits dwarf // expression where it expects +ve number. - BaseOffset = 0 - CGM.getVTables().getVirtualBaseOffsetOffset(RD, Base); + BaseOffset = + 0 - CGM.getVTables().getVirtualBaseOffsetOffset(RD, Base).getQuantity(); BFlags = llvm::DIDescriptor::FlagVirtual; } else BaseOffset = RL.getBaseClassOffsetInBits(Base); + // FIXME: Inconsistent units for BaseOffset. It is in bytes when + // BI->isVirtual() and bits when not. AccessSpecifier Access = BI->getAccessSpecifier(); if (Access == clang::AS_private) |