summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTT.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/CodeGen/CGVTT.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTT.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTT.cpp b/clang/lib/CodeGen/CGVTT.cpp
index aca9e7a3e62..895afd75afc 100644
--- a/clang/lib/CodeGen/CGVTT.cpp
+++ b/clang/lib/CodeGen/CGVTT.cpp
@@ -94,7 +94,8 @@ CodeGenVTables::EmitVTTDefinition(llvm::GlobalVariable *VTT,
// Set the correct linkage.
VTT->setLinkage(Linkage);
- CGM.maybeSetTrivialComdat(*VTT);
+ if (CGM.supportsCOMDAT() && VTT->isWeakForLinker())
+ VTT->setComdat(CGM.getModule().getOrInsertComdat(VTT->getName()));
// Set the right visibility.
CGM.setGlobalVisibility(VTT, RD);
@@ -176,3 +177,4 @@ CodeGenVTables::getSecondaryVirtualPointerIndex(const CXXRecordDecl *RD,
return I->second;
}
+
OpenPOWER on IntegriCloud