[cfe-commits] r95678 - /cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Devang Patel
dpatel at apple.com
Tue Feb 9 11:09:28 PST 2010
Author: dpatel
Date: Tue Feb 9 13:09:28 2010
New Revision: 95678
URL: http://llvm.org/viewvc/llvm-project?rev=95678&view=rev
Log:
Fix virtual bases' debug info.
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=95678&r1=95677&r2=95678&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Tue Feb 9 13:09:28 2010
@@ -641,7 +641,7 @@
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 @@
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);
More information about the cfe-commits
mailing list