Skip to content
Commit 0de3d1c8 authored by Ella Ma's avatar Ella Ma Committed by Teresa Johnson
Browse files

[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
parent 436c6c9c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment