summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2009-12-05 22:24:38 +0000
committerAnders Carlsson <andersca@mac.com>2009-12-05 22:24:38 +0000
commit0ab79e22abf4aa1c64b47bcd9dbc3402f8aad060 (patch)
tree2d70f0ddac1b77117f945b54ac4eab9c659a7ff8 /clang/lib
parent58b271d450a6feeca88567f746185d2237657e49 (diff)
downloadbcm5719-llvm-0ab79e22abf4aa1c64b47bcd9dbc3402f8aad060.tar.gz
bcm5719-llvm-0ab79e22abf4aa1c64b47bcd9dbc3402f8aad060.zip
If a class does not have a key function, its linkage should be weak_odr.
llvm-svn: 90680
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/CodeGen/CGVtable.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGVtable.cpp b/clang/lib/CodeGen/CGVtable.cpp
index 9ed90f0ba51..9c78c236313 100644
--- a/clang/lib/CodeGen/CGVtable.cpp
+++ b/clang/lib/CodeGen/CGVtable.cpp
@@ -1092,7 +1092,7 @@ createGlobalVariable(CodeGenModule &CGM, const CXXRecordDecl *RD,
// Figure out the right linkage.
llvm::GlobalVariable::LinkageTypes Linkage =
- llvm::GlobalValue::LinkOnceODRLinkage;
+ llvm::GlobalValue::WeakODRLinkage;
if (!Init)
Linkage = llvm::GlobalValue::ExternalLinkage;
else if (RD->isInAnonymousNamespace())
@@ -1167,7 +1167,7 @@ llvm::Constant *CodeGenModule::GenerateVtable(const CXXRecordDecl *LayoutClass,
b.getVtable().size());
}
llvm::GlobalVariable *OGV = GV;
- GV = createGlobalVariable(*this, LayoutClass, ntype, C, Name);
+ GV = createGlobalVariable(*this, LayoutClass, ArrayType, Init, Name);
if (OGV) {
GV->takeName(OGV);
llvm::Constant *NewPtr =
OpenPOWER on IntegriCloud