Skip to content

Commit eff4a5d

Browse files
committed
Update Paths.cpp to allow llvm 20 build
1 parent bd18874 commit eff4a5d

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

lib/Interpreter/Paths.cpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,29 @@ void CopyIncludePaths(const clang::HeaderSearchOptions& Opts,
175175
if (withFlags) incpaths.push_back("-isystem");
176176
break;
177177

178+
// Option was removed in llvm 20. Git log message below.
179+
// git log --grep="index-header"
180+
// commit 19b4f17d4c0ae12725050d09f04f85bccc686d8e
181+
// Author: Jan Svoboda <[email protected]>
182+
// Date: Thu Oct 31 16:04:35 2024 -0700
183+
//
184+
// [clang][lex] Remove `-index-header-map` (#114459)
185+
//
186+
// This PR removes the `-index-header-map` functionality from Clang.
187+
// AFAIK this was only used internally at Apple and is now dead code.
188+
// The main motivation behind this change is to enable the removal of
189+
// `HeaderFileInfo::Framework` member and reducing the size of that
190+
// data structure.
191+
//
192+
// rdar://84036149
193+
194+
#if CLANG_VERSION_MAJOR < 20
178195
case frontend::IndexHeaderMap:
179196
if (!withSystem) continue;
180197
if (withFlags) incpaths.push_back("-index-header-map");
181198
if (withFlags) incpaths.push_back(E.IsFramework? "-F" : "-I");
182199
break;
200+
#endif
183201

184202
case frontend::CSystem:
185203
if (!withSystem) continue;

0 commit comments

Comments
 (0)