diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-02-19 21:01:34 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-02-19 21:01:34 +0000 |
commit | 66abf2f92f11d20c6c5c33762bde67f4b1725b04 (patch) | |
tree | c5cb247e731f687021912ff38f27e27bda331e9d /clang/lib/CodeGen/CodeGenFunction.cpp | |
parent | cdaea4db269646e25b97e8139a37849303c56e92 (diff) | |
download | bcm5719-llvm-66abf2f92f11d20c6c5c33762bde67f4b1725b04.tar.gz bcm5719-llvm-66abf2f92f11d20c6c5c33762bde67f4b1725b04.zip |
Put the implicit weak sized deallocation funciton in C++14 in a comdat
Fixes PR22635.
llvm-svn: 229913
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 2 |
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. |