forked from OSchip/llvm-project
DebugInfo: Don't call DIBuilder::retainType(nullptr)
An upcoming LLVM commit will make calling `DIBuilder::retainType(nullptr)` illegal (actually, it already was, but it wasn't verified). Check for null before calling. This triggered in test/CodeGenObjC/debug-info-block-helper.m. llvm-svn: 233443
This commit is contained in:
parent
d5c60d032f
commit
5043f91657
|
@ -3432,7 +3432,8 @@ void CGDebugInfo::finalize() {
|
||||||
void CGDebugInfo::EmitExplicitCastType(QualType Ty) {
|
void CGDebugInfo::EmitExplicitCastType(QualType Ty) {
|
||||||
if (CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo)
|
if (CGM.getCodeGenOpts().getDebugInfo() < CodeGenOptions::LimitedDebugInfo)
|
||||||
return;
|
return;
|
||||||
llvm::DIType DieTy = getOrCreateType(Ty, getOrCreateMainFile());
|
|
||||||
// Don't ignore in case of explicit cast where it is referenced indirectly.
|
if (llvm::DIType DieTy = getOrCreateType(Ty, getOrCreateMainFile()))
|
||||||
DBuilder.retainType(DieTy);
|
// Don't ignore in case of explicit cast where it is referenced indirectly.
|
||||||
|
DBuilder.retainType(DieTy);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue