forked from OSchip/llvm-project
Fix unconditional dereference of a WeakVH in CGDebugInfo TypeCache
This fails an "isa<> used with null pointer" assert during a clang-cl self-host on Windows. This was caused by r202769, and I'm currently reducing a test case. Reviewers: dblaikie Differential Revision: http://llvm-reviews.chandlerc.com/D2944 llvm-svn: 202888
This commit is contained in:
parent
1251053e04
commit
e0b9201f5a
|
@ -3341,7 +3341,8 @@ 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)
|
||||
DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(TypeCache[*RI])));
|
||||
if (llvm::Value *V = TypeCache[*RI])
|
||||
DBuilder.retainType(llvm::DIType(cast<llvm::MDNode>(V)));
|
||||
|
||||
DBuilder.finalize();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue