Skip to content

Commit b62bdd8

Browse files
authored
Merge pull request #60491 from akyrtzi/pr/rebarnch-update-CreateLLVMCodeGen
[rebranch][IRGen] Update for upstream `clang::CreateLLVMCodeGen()` API change
2 parents 7fb71b9 + 5c058d9 commit b62bdd8

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/IRGen/IRGenModule.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
#include "clang/CodeGen/CodeGenABITypes.h"
3636
#include "clang/CodeGen/ModuleBuilder.h"
3737
#include "clang/CodeGen/SwiftCallingConv.h"
38+
#include "clang/Frontend/CompilerInstance.h"
3839
#include "clang/Lex/Preprocessor.h"
3940
#include "clang/Lex/PreprocessorOptions.h"
4041
#include "clang/Lex/HeaderSearch.h"
@@ -137,12 +138,13 @@ static clang::CodeGenerator *createClangCodeGenerator(ASTContext &Context,
137138
CGO.TrapFuncName = Opts.TrapFuncName;
138139
}
139140

141+
auto &VFS = Importer->getClangInstance().getVirtualFileSystem();
140142
auto &HSI = Importer->getClangPreprocessor()
141143
.getHeaderSearchInfo()
142144
.getHeaderSearchOpts();
143145
auto &PPO = Importer->getClangPreprocessor().getPreprocessorOpts();
144146
auto *ClangCodeGen = clang::CreateLLVMCodeGen(ClangContext.getDiagnostics(),
145-
ModuleName, HSI, PPO, CGO,
147+
ModuleName, &VFS, HSI, PPO, CGO,
146148
LLVMContext);
147149
ClangCodeGen->Initialize(ClangContext);
148150
return ClangCodeGen;

0 commit comments

Comments
 (0)