Skip to content

Commit a4adb81

Browse files
committed
Temporarily revert LLVM commit: llvm/llvm-project#87848
1 parent 9f950be commit a4adb81

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

interpreter/llvm-project/clang/lib/Lex/HeaderSearch.cpp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -960,13 +960,9 @@ OptionalFileEntryRef HeaderSearch::LookupFile(
960960
// If we have no includer, that means we're processing a #include
961961
// from a module build. We should treat this as a system header if we're
962962
// building a [system] module.
963-
bool IncluderIsSystemHeader = [&]() {
964-
if (!Includer)
965-
return BuildSystemModule;
966-
const HeaderFileInfo *HFI = getExistingFileInfo(*Includer);
967-
assert(HFI && "includer without file info");
968-
return HFI->DirInfo != SrcMgr::C_User;
969-
}();
963+
bool IncluderIsSystemHeader =
964+
Includer ? getFileInfo(*Includer).DirInfo != SrcMgr::C_User :
965+
BuildSystemModule;
970966
if (OptionalFileEntryRef FE = getFileAndSuggestModule(
971967
TmpDir, IncludeLoc, IncluderAndDir.second, IncluderIsSystemHeader,
972968
RequestingModule, SuggestedModule)) {

0 commit comments

Comments
 (0)