forked from OSchip/llvm-project
parent
954cb187e0
commit
128aa9d176
|
@ -653,36 +653,36 @@ CollectCXXBases(const CXXRecordDecl *Decl,
|
|||
llvm::SmallVectorImpl<llvm::DIDescriptor> &EltTys,
|
||||
llvm::DICompositeType &RecordTy) {
|
||||
|
||||
const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(Decl);
|
||||
for (CXXRecordDecl::base_class_const_iterator BI = Decl->bases_begin(),
|
||||
BE = Decl->bases_end(); BI != BE; ++BI) {
|
||||
unsigned BFlags = 0;
|
||||
uint64_t BaseOffset;
|
||||
|
||||
const CXXRecordDecl *Base =
|
||||
cast<CXXRecordDecl>(BI->getType()->getAs<RecordType>()->getDecl());
|
||||
|
||||
if (BI->isVirtual()) {
|
||||
BaseOffset = RL.getVBaseClassOffset(Base);
|
||||
BFlags = llvm::DIType::FlagVirtual;
|
||||
} else
|
||||
BaseOffset = RL.getBaseClassOffset(Base);
|
||||
|
||||
AccessSpecifier Access = BI->getAccessSpecifier();
|
||||
if (Access == clang::AS_private)
|
||||
BFlags |= llvm::DIType::FlagPrivate;
|
||||
else if (Access == clang::AS_protected)
|
||||
BFlags |= llvm::DIType::FlagProtected;
|
||||
|
||||
llvm::DIType DTy =
|
||||
DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_inheritance,
|
||||
RecordTy, llvm::StringRef(),
|
||||
llvm::DICompileUnit(), 0, 0, 0,
|
||||
BaseOffset, BFlags,
|
||||
getOrCreateType(BI->getType(),
|
||||
Unit));
|
||||
EltTys.push_back(DTy);
|
||||
}
|
||||
const ASTRecordLayout &RL = CGM.getContext().getASTRecordLayout(Decl);
|
||||
for (CXXRecordDecl::base_class_const_iterator BI = Decl->bases_begin(),
|
||||
BE = Decl->bases_end(); BI != BE; ++BI) {
|
||||
unsigned BFlags = 0;
|
||||
uint64_t BaseOffset;
|
||||
|
||||
const CXXRecordDecl *Base =
|
||||
cast<CXXRecordDecl>(BI->getType()->getAs<RecordType>()->getDecl());
|
||||
|
||||
if (BI->isVirtual()) {
|
||||
BaseOffset = RL.getVBaseClassOffset(Base);
|
||||
BFlags = llvm::DIType::FlagVirtual;
|
||||
} else
|
||||
BaseOffset = RL.getBaseClassOffset(Base);
|
||||
|
||||
AccessSpecifier Access = BI->getAccessSpecifier();
|
||||
if (Access == clang::AS_private)
|
||||
BFlags |= llvm::DIType::FlagPrivate;
|
||||
else if (Access == clang::AS_protected)
|
||||
BFlags |= llvm::DIType::FlagProtected;
|
||||
|
||||
llvm::DIType DTy =
|
||||
DebugFactory.CreateDerivedType(llvm::dwarf::DW_TAG_inheritance,
|
||||
RecordTy, llvm::StringRef(),
|
||||
llvm::DICompileUnit(), 0, 0, 0,
|
||||
BaseOffset, BFlags,
|
||||
getOrCreateType(BI->getType(),
|
||||
Unit));
|
||||
EltTys.push_back(DTy);
|
||||
}
|
||||
}
|
||||
|
||||
/// getOrCreateVTablePtrType - Return debug info descriptor for vtable.
|
||||
|
|
Loading…
Reference in New Issue