summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-19 21:13:45 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-19 21:13:45 +0000
commit4343922ddef51199854243d3beded0443fcd3a3e (patch)
treef44429ca0f3526b8d80b2dc60b5634408ea11ff0 /clang/lib/CodeGen/CodeGenFunction.cpp
parent1174fea31c85219563798784024a0637bb470309 (diff)
downloadbcm5719-llvm-4343922ddef51199854243d3beded0443fcd3a3e.tar.gz
bcm5719-llvm-4343922ddef51199854243d3beded0443fcd3a3e.zip
Avoid using a COMDAT for sized delete on MachO
llvm-svn: 229915
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenFunction.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp
index fa9697ec51e..1802d2b5cd6 100644
--- a/clang/lib/CodeGen/CodeGenFunction.cpp
+++ b/clang/lib/CodeGen/CodeGenFunction.cpp
@@ -806,8 +806,9 @@ 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()));
+ if (CGF.CGM.supportsCOMDAT())
+ CGF.CurFn->setComdat(
+ CGF.CGM.getModule().getOrInsertComdat(CGF.CurFn->getName()));
// Call the unsized deallocation function and forward the first argument
// unchanged.
OpenPOWER on IntegriCloud