[llvm-bugs] [Bug 43954] New: [clang-cl] Missing inherited constructor in exported symbols
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Nov 9 10:34:09 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=43954
Bug ID: 43954
Summary: [clang-cl] Missing inherited constructor in exported
symbols
Product: clang
Version: 9.0
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: qwertiest at mail.ru
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
Created attachment 22790
--> https://bugs.llvm.org/attachment.cgi?id=22790&action=edit
Source files for repro
Description:
clang-cl does not export the inherited constructor (defined via `using
Base::Base`), which breaks compatibility with MSVC cl.
Repro steps (see attachments for source files):
1. `clang-cl.exe /LD class.cpp /DMY_EXPORT_API /link /DLL /out:class.dll`
2. `cl.exe main.cpp class.lib`
Observed result:
```
main.obj : error LNK2019: unresolved external symbol "__declspec(dllimport)
public: __thiscall DerivedWithCtor::DerivedWithCtor(void const *)"
(__imp_??0DerivedWithCtor@@QAE at PBX@Z) referenced in function "public:
__thiscall DerivedCheck::DerivedCheck(void)" (??0DerivedCheck@@QAE at XZ)
```
This is the mangling issue since manual inspection of produced DLL shows that
there was no constructor exported for `DerivedWithCtor`.
The step 1. can be performed with cl.exe for comparison.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191109/7200acfd/attachment.html>
More information about the llvm-bugs
mailing list