ModuleMap::findHeader - fix null dereference warning. NFCI.

We were checking M for a null value after we'd already dereferenced it multiple times.
This commit is contained in:
Simon Pilgrim 2019-11-03 11:33:57 +00:00
parent 3823759afb
commit 0b4c2ee381
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ const FileEntry *ModuleMap::findHeader(
llvm::sys::path::append(FullPathName, RelativePathName);
auto *NormalHdrFile = GetFile(FullPathName);
if (M && !NormalHdrFile && Directory->getName().endswith(".framework")) {
if (!NormalHdrFile && Directory->getName().endswith(".framework")) {
// The lack of 'framework' keyword in a module declaration it's a simple
// mistake we can diagnose when the header exists within the proper
// framework style path.