diff options
author | Devang Patel <dpatel@apple.com> | 2010-02-09 19:09:28 +0000 |
---|---|---|
committer | Devang Patel <dpatel@apple.com> | 2010-02-09 19:09:28 +0000 |
commit | d5322da6ba08728fe4ee9b14f468961eddc915dc (patch) | |
tree | fa0ccc59203a43c01426bf533a2a8299688f70ff /lib/CodeGen/CGDebugInfo.cpp | |
parent | 8d69937281b790666f48f71ac8ad7821e60bacee (diff) |
Fix virtual bases' debug info.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@95678 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/CGDebugInfo.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/CodeGen/CGDebugInfo.cpp b/lib/CodeGen/CGDebugInfo.cpp index 8b3e195fa5..6f84add037 100644 --- a/lib/CodeGen/CGDebugInfo.cpp +++ b/lib/CodeGen/CGDebugInfo.cpp @@ -641,7 +641,7 @@ CollectCXXMemberFunctions(const CXXRecordDecl *RD, llvm::DICompileUnit Unit, E = RD->method_end(); I != E; ++I) { const CXXMethodDecl *Method = *I; - if (Method->isImplicit()) + if (Method->isImplicit() && !Method->isUsed()) continue; EltTys.push_back(CreateCXXMemberFunction(Method, Unit, RecordTy)); @@ -666,7 +666,9 @@ CollectCXXBases(const CXXRecordDecl *RD, llvm::DICompileUnit Unit, cast<CXXRecordDecl>(BI->getType()->getAs<RecordType>()->getDecl()); if (BI->isVirtual()) { - BaseOffset = RL.getVBaseClassOffset(Base); + // virtual base offset index is -ve. The code generator emits dwarf + // expression where it expects +ve number. + BaseOffset = 0 - CGM.getVtableInfo().getVirtualBaseOffsetIndex(RD, Base); BFlags = llvm::DIType::FlagVirtual; } else BaseOffset = RL.getBaseClassOffset(Base); |