mirror of
https://github.com/intel/llvm.git
synced 2026-02-04 03:26:06 +08:00
[SourceManager] Skip module maps when searching files for macro arguments
Differential Revision: https://reviews.llvm.org/D86230
This commit is contained in:
@@ -1761,7 +1761,12 @@ void SourceManager::computeMacroArgsCache(MacroArgsMap &MacroArgsCache,
|
||||
if (Invalid)
|
||||
return;
|
||||
if (Entry.isFile()) {
|
||||
SourceLocation IncludeLoc = Entry.getFile().getIncludeLoc();
|
||||
auto File = Entry.getFile();
|
||||
if (File.getFileCharacteristic() == C_User_ModuleMap ||
|
||||
File.getFileCharacteristic() == C_System_ModuleMap)
|
||||
continue;
|
||||
|
||||
SourceLocation IncludeLoc = File.getIncludeLoc();
|
||||
bool IncludedInFID =
|
||||
(IncludeLoc.isValid() && isInFileID(IncludeLoc, FID)) ||
|
||||
// Predefined header doesn't have a valid include location in main
|
||||
|
||||
Reference in New Issue
Block a user