[llvm-bugs] [Bug 27811] New: [ms] clang-cl emits scalar deleting ctor and vtable for templates with dllimported instantiation declaration
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed May 18 19:28:02 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=27811
Bug ID: 27811
Summary: [ms] clang-cl emits scalar deleting ctor and vtable
for templates with dllimported instantiation
declaration
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: nicolasweber at gmx.de
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Somewhat similar to bug 27810, but I'm less sure that it's wrong -- I vaguely
remember that we emit some members more often than cl on purpose.
Anyhow...consider:
template <class T>
struct codecvt {
virtual ~codecvt() {
}
};
template class __declspec(dllimport) codecvt<char>;
clang-cl emits a whole lot of stuff for this. cl emits nothing. Regular
non-windows clang also emits nothing if this is converted to an `extern
template class codecvt<char>`.
This too causes us to emit many functions (order of 60) into every TU including
MS C++ headers. Other than bug 27810, these functions disappear after -O2, but
it'd probably be much faster to not emit them in the first place, instead of
relying on the optimizer to clean them up.
--
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/20160519/3dcbf579/attachment.html>
More information about the llvm-bugs
mailing list