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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@202888
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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();
}