Put the implicit weak sized deallocation funciton in C++14 in a comdat
Fixes PR22635. llvm-svn: 229913
This commit is contained in:
@@ -806,6 +806,8 @@ static void EmitSizedDeallocationFunction(CodeGenFunction &CGF,
|
||||
const FunctionDecl *UnsizedDealloc) {
|
||||
// This is a weak discardable definition of the sized deallocation function.
|
||||
CGF.CurFn->setLinkage(llvm::Function::LinkOnceAnyLinkage);
|
||||
CGF.CurFn->setComdat(
|
||||
CGF.CGM.getModule().getOrInsertComdat(CGF.CurFn->getName()));
|
||||
|
||||
// Call the unsized deallocation function and forward the first argument
|
||||
// unchanged.
|
||||
|
||||
Reference in New Issue
Block a user