[PATCH] D118586: [C++20][Modules][3/8] Initial handling for module partitions.

Chuanqi Xu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Feb 17 01:32:22 PST 2022


ChuanqiXu added inline comments.


================
Comment at: clang/lib/Sema/SemaModule.cpp:367-368
+      // owning named module.
+      size_t P = NamedMod->Name.find_first_of(":");
+      ModuleName = NamedMod->Name.substr(0, P + 1);
+    } else {
----------------
ChuanqiXu wrote:
> I would like to wrap this one as a method of class `Module`:
> ```
> StringRef getPrimaryModuleName(Module *M) {
>     if (not partition)
>        return M->Name;
>     return M->Name.split(":").first;
> }
> ```
Oh, I found it made it in following patches. I think the series of patch is a little bit sparse.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118586/new/

https://reviews.llvm.org/D118586



More information about the cfe-commits mailing list