Issue 89781
Summary [C++20] [Modules] Clang does not implement strong ownership model when targeting MSVC ABI
Labels clang
Assignees
Reporter huangqinjin
    #### `hello.cppm`
```c++
export module hello;
export void greeting() {}
```

#### MSVC
```shell
>cl /std:c++20 /TP /interface /c hello.cppm
>dumpbin /symbols hello.obj | findstr greeting
009 00000000 SECT3  notype ()    External     | ?greeting@@YAXXZ::<!hello> (void __cdecl greeting(void))
```

#### Clang MSVC ABI
```shell
>clang --target=x86_64-windows-msvc -std=c++20 -c hello.cppm
>dumpbin /symbols hello.o | findstr greeting
00B 00000000 SECT1  notype ()    External     | ?greeting@@YAXXZ (void __cdecl greeting(void))
```

#### Clang GNU ABI
```shell
>clang --target=x86_64-windows-gnu -std=c++20 -c hello.cppm
>>dumpbin /symbols hello.o | findstr greeting
00D 00000000 SECT1  notype ()    External     | _ZW5hello8greetingv
```

The symbol mangling includes the module name for GNU ABI but not for MSVC ABI.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to