https://bugs.llvm.org/show_bug.cgi?id=47683
Bug ID: 47683
Summary: Constructor for template class codegen'd multiple
times with dllexport explicit instantiation
Product: new-bugs
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected],
[email protected], [email protected]
$ cat /tmp/repro.cc
class a {
public:
a();
};
class b;
template <class> class c {
c() = default;
a d;
};
extern template class c<b>;
template class __declspec(dllexport) c<b>;
$ clang -cc1 -triple x86_64-pc-windows-msvc19.16.0 -fms-compatibility
-emit-llvm /tmp/repro.cc
clang: ../../clang/lib/CodeGen/CodeGenFunction.cpp:694: void
clang::CodeGen::CodeGenFunction::StartFunction(clang::GlobalDecl,
clang::QualType, llvm::Function *, const clang::CodeGen::CGFunctionInfo &,
const clang::CodeGen::FunctionArgList &, clang::SourceLocation,
clang::SourceLocation): Assertion `CurFn->isDeclaration() && "Function already
has body?"' failed.
https://bugs.llvm.org/show_bug.cgi?id=42857 seems related.
--
You are receiving this mail because:
You are on the CC list for the bug._______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs