[all-commits] [llvm/llvm-project] 2e9977: [C++20] [Modules] Treat module linkage as formal l...

Chuanqi Xu via All-commits all-commits at lists.llvm.org
Mon Mar 13 00:55:10 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2e9977c2815653c141c6c060c4e0ab6c0db27911
      https://github.com/llvm/llvm-project/commit/2e9977c2815653c141c6c060c4e0ab6c0db27911
  Author: Chuanqi Xu <yedeng.yd at linux.alibaba.com>
  Date:   2023-03-13 (Mon, 13 Mar 2023)

  Changed paths:
    M clang/include/clang/AST/Decl.h
    M clang/lib/AST/Decl.cpp
    A clang/test/Modules/inconsistent-export.cppm
    M clang/unittests/AST/DeclTest.cpp

  Log Message:
  -----------
  [C++20] [Modules] Treat module linkage as formal linkage only

Close https://github.com/llvm/llvm-project/issues/61321

There are two linkage modes in clang now: one for internal linkage and
one for formal linkage. The internal linkage is for the implementation
details and the formal linkage is for the consistency with the C++
standard.

Since we previously implemented the strong ownership for modules, the
module linkage is not meaningful for linkers any more. So the module
linkage should only be used for formal linkage.




More information about the All-commits mailing list