llvm/llvm-project

[C++20] [Modules] Not proper module initializer

Open

#174,065 建立於 2025年12月31日

在 GitHub 查看
 (2 留言) (0 反應) (0 負責人)C++ (10,782 fork)batch import
ABIclang:moduleshelp wantedplatform:windows

倉庫指標

Star
 (26,378 star)
PR 合併指標
 (平均合併 1天 2小時) (30 天內合併 1,000 個 PR)

描述

In my local linux machine, for

export module a;

When I generate the code, I can see:

define void @_ZGIW1a() #0 section ".text.startup" {
entry:
  ret void
}

this is used for initializing entities for the module unit. Itanium C++ ABI asks us to generate this even if we don't need to initialize any thing.

But if I turned MSVC ABI, I can say nothing for the initializer. We need input from MSVC, either formal docs or developers, how should we do here. And if we missed anything, we need to implement the module initializer for Windows ABI.

Estimated difficulty: medium

貢獻者指南