Split from D91844.
The local variable `Unit` in function `DWARFLinker::loadClangModule`
in file `llvm/lib/DWARFLinker/DWARFLinker.cpp`. If the variable is not set
in the loop below its definition, it will trigger a null pointer dereference
after the loop.
Patch By: OikawaKirie
Reviewed By: avl
Differential Revision: https://reviews.llvm.org/D97185
Unit->markEverythingAsKept();
}
}
+ assert(Unit && "CompileUnit is not set!");
if (!Unit->getOrigUnit().getUnitDIE().hasChildren())
return Error::success();
if (!Quiet && Options.Verbose) {