summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-02-11 18:50:13 +0000
committerReid Kleckner <reid@kleckner.net>2015-02-11 18:50:13 +0000
commit4c209c7e1f649f3c6a545a9c843a151acc8c8ce9 (patch)
treedf3c7e754e882eb4504b79b4e2210ac69b05435c /clang/lib/CodeGen/CGException.cpp
parenta906ee754db108e836a8c9a9d308f47f6cd264d6 (diff)
downloadbcm5719-llvm-4c209c7e1f649f3c6a545a9c843a151acc8c8ce9.tar.gz
bcm5719-llvm-4c209c7e1f649f3c6a545a9c843a151acc8c8ce9.zip
Add a comdat to __clang_call_terminate
llvm-svn: 228863
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index a632a40e14a..9df4f977318 100644
--- a/clang/lib/CodeGen/CGException.cpp
+++ b/clang/lib/CodeGen/CGException.cpp
@@ -1564,6 +1564,8 @@ static llvm::Constant *getClangCallTerminateFn(CodeGenModule &CGM) {
// we don't want it to turn into an exported symbol.
fn->setLinkage(llvm::Function::LinkOnceODRLinkage);
fn->setVisibility(llvm::Function::HiddenVisibility);
+ if (CGM.supportsCOMDAT())
+ fn->setComdat(CGM.getModule().getOrInsertComdat(fn->getName()));
// Set up the function.
llvm::BasicBlock *entry =
OpenPOWER on IntegriCloud