summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index ec726098a54..fa9697ec51e 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -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.
OpenPOWER on IntegriCloud