[llvm] Add assertions for the smart pointers with the possibility to be null...
[llvm] Add assertions for the smart pointers with the possibility to be null in ModuleLazyLoaderCache::operator() Split from D91844. The return value of function `ModuleLazyLoaderCache::operator()` in file llvm/tools/llvm-link/llvm-link.cpp. According to the bug report of my static analyzer, the std::function variable `ModuleLazyLoaderCache::createLazyModule` points to function `loadFile`, which may return `nullptr` when error. And the pointer is dereferenced without a check. Reviewed By: tejohnson Differential Revision: https://reviews.llvm.org/D97258
Loading
Please sign in to comment