forked from OSchip/llvm-project
If there is not any debug info for type then do not emit debug info for this variable.
A recent change to tightly verify debug info prepared by FE caught this. This fixes unittest build. llvm-svn: 103320
This commit is contained in:
parent
54c59312b1
commit
67eba80672
|
@ -1478,6 +1478,11 @@ void CGDebugInfo::EmitDeclare(const VarDecl *VD, unsigned Tag,
|
|||
else
|
||||
Ty = getOrCreateType(VD->getType(), Unit);
|
||||
|
||||
// If there is not any debug info for type then do not emit debug info
|
||||
// for this variable.
|
||||
if (!Ty)
|
||||
return;
|
||||
|
||||
// Get location information.
|
||||
SourceManager &SM = CGM.getContext().getSourceManager();
|
||||
PresumedLoc PLoc = SM.getPresumedLoc(VD->getLocation());
|
||||
|
|
Loading…
Reference in New Issue