aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend/FrontendAction.cpp
diff options
context:
space:
mode:
authorChuanqi Xu <yedeng.yd@linux.alibaba.com>2023-05-23 13:26:16 +0800
committerChuanqi Xu <yedeng.yd@linux.alibaba.com>2023-05-23 14:22:01 +0800
commit807aa261361f4cd9153dda43c9cadbd3fcc659c5 (patch)
tree4fc1bb3d06747c3fcf9e7949e500511d7a32e9e8 /clang/lib/Frontend/FrontendAction.cpp
parent53064c5023a0e64ee7decbe7afcc6e235d0b97ea (diff)
downloadllvm-807aa261361f4cd9153dda43c9cadbd3fcc659c5.zip
llvm-807aa261361f4cd9153dda43c9cadbd3fcc659c5.tar.gz
llvm-807aa261361f4cd9153dda43c9cadbd3fcc659c5.tar.bz2
[C++20] [Modules] Don't ignore -fmodule-file when we compile pcm files
Close https://github.com/llvm/llvm-project/issues/62843. Previously when we compile .pcm files into .o files, the `-fmodule-file=<module-name>=<module-path>` option is ignored. This is conflicted with our consensus in https://github.com/llvm/llvm-project/issues/62707.
Diffstat (limited to 'clang/lib/Frontend/FrontendAction.cpp')
-rw-r--r--clang/lib/Frontend/FrontendAction.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Frontend/FrontendAction.cpp b/clang/lib/Frontend/FrontendAction.cpp
index c5f3efc..a785ad8 100644
--- a/clang/lib/Frontend/FrontendAction.cpp
+++ b/clang/lib/Frontend/FrontendAction.cpp
@@ -612,7 +612,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
std::string(InputFile), CI.getPCHContainerReader(),
ASTUnit::LoadPreprocessorOnly, ASTDiags, CI.getFileSystemOpts(),
- CI.getCodeGenOpts().DebugTypeExtRefs);
+ /*HeaderSearchOptions=*/nullptr, CI.getCodeGenOpts().DebugTypeExtRefs);
if (!AST)
return false;
@@ -680,6 +680,7 @@ bool FrontendAction::BeginSourceFile(CompilerInstance &CI,
std::unique_ptr<ASTUnit> AST = ASTUnit::LoadFromASTFile(
std::string(InputFile), CI.getPCHContainerReader(),
ASTUnit::LoadEverything, Diags, CI.getFileSystemOpts(),
+ CI.getHeaderSearchOptsPtr(),
CI.getCodeGenOpts().DebugTypeExtRefs);
if (!AST)