diff options
author | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-13 17:12:20 +0800 |
---|---|---|
committer | Chuanqi Xu <yedeng.yd@linux.alibaba.com> | 2023-02-13 17:14:58 +0800 |
commit | 24ecd99842352ed1e6d7877e76e93c2f83ebf3f3 (patch) | |
tree | e047fabd245c876e1c7ea5c867c9503b5c4865e7 /clang/lib/Sema/SemaModule.cpp | |
parent | 19659b5f0dd1a1dcf745cf058d042ada2d4ff061 (diff) | |
download | llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.zip llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.tar.gz llvm-24ecd99842352ed1e6d7877e76e93c2f83ebf3f3.tar.bz2 |
[NFC] Set C++20 Named Modules for CodeGen in ASTContext in the early place
Previously we'll set the named modules for ASTContext in ParseAST. But
this is not intuitive and we need comments to tell the intuition. This
patch moves the code the right the place, where the corrresponding
module is first created/loaded. Now it is more intuitive and we can use
the value in the earlier places.
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
-rw-r--r-- | clang/lib/Sema/SemaModule.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/Sema/SemaModule.cpp b/clang/lib/Sema/SemaModule.cpp index 194239a..8f38dc8 100644 --- a/clang/lib/Sema/SemaModule.cpp +++ b/clang/lib/Sema/SemaModule.cpp @@ -409,6 +409,8 @@ Sema::ActOnModuleDecl(SourceLocation StartLoc, SourceLocation ModuleLoc, return ConvertDeclToDeclGroup(Import); } + getASTContext().setNamedModuleForCodeGen(Mod); + // FIXME: Create a ModuleDecl. return nullptr; } |