summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-11 19:35:06 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-11 19:35:06 +0000
commitb15683e6357b1786ac26779cf377ea6cdebb8497 (patch)
tree5ab58e17e20f68fd0fee6e68d8bfc33612a64a99 /clang/lib/CodeGen/CGCXX.cpp
parent124e93de93f14baed40411113623f1e3b652100d (diff)
downloadbcm5719-llvm-b15683e6357b1786ac26779cf377ea6cdebb8497.tar.gz
bcm5719-llvm-b15683e6357b1786ac26779cf377ea6cdebb8497.zip
Fix pr17875.
The assert this patch deletes was valid only when aliasing D2 to D1, not when looking at a base class. Since the assert was in the path where we had already decided to not produce an alias, just drop it. llvm-svn: 194411
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index f79e079745c..0f55616ea6b 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -150,10 +150,8 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
// Don't create an alias to a linker weak symbol unless we know we can do
// that in every TU. This avoids producing different COMDATs in different
// TUs.
- if (llvm::GlobalValue::isWeakForLinker(TargetLinkage)) {
- assert(Linkage == TargetLinkage);
+ if (llvm::GlobalValue::isWeakForLinker(TargetLinkage))
return true;
- }
}
// Create the alias with no name.
OpenPOWER on IntegriCloud