mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-02-10 19:34:29 +00:00
DebugInfo: Refix r202888 (a fix to r202769) in a different way, ensuring types aren't needlessly built during -gmlt
llvm-svn: 202900
This commit is contained in:
parent
9bbf3cd3d7
commit
0856f66dd2
@ -1435,6 +1435,9 @@ void CGDebugInfo::completeType(const RecordDecl *RD) {
|
||||
}
|
||||
|
||||
void CGDebugInfo::completeRequiredType(const RecordDecl *RD) {
|
||||
if (DebugKind <= CodeGenOptions::DebugLineTablesOnly)
|
||||
return;
|
||||
|
||||
if (const CXXRecordDecl *CXXDecl = dyn_cast<CXXRecordDecl>(RD))
|
||||
if (CXXDecl->isDynamicClass())
|
||||
return;
|
||||
@ -2042,6 +2045,9 @@ llvm::DIType CGDebugInfo::getCompletedTypeOrNull(QualType Ty) {
|
||||
|
||||
void CGDebugInfo::completeTemplateDefinition(
|
||||
const ClassTemplateSpecializationDecl &SD) {
|
||||
if (DebugKind <= CodeGenOptions::DebugLineTablesOnly)
|
||||
return;
|
||||
|
||||
completeClassData(&SD);
|
||||
// In case this type has no member function definitions being emitted, ensure
|
||||
// it is retained
|
||||
@ -3341,8 +3347,7 @@ void CGDebugInfo::finalize() {
|
||||
// up the final type in the type cache.
|
||||
for (std::vector<void *>::const_iterator RI = RetainedTypes.begin(),
|
||||
RE = RetainedTypes.end(); RI != RE; ++RI)
|
||||
if (llvm::Value *V = TypeCache[*RI])
|
||||
DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(V)));
|
||||
DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(TypeCache[*RI])));
|
||||
|
||||
DBuilder.finalize();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user