summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGCXX.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2013-11-06 19:18:55 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2013-11-06 19:18:55 +0000
commit5fb3a13ba7523d3a93290bcfa033b835151c19aa (patch)
tree42ff9bbfc791f2c6ff5833ef4c664a7c3da7d060 /clang/lib/CodeGen/CGCXX.cpp
parent05b7b37021b3601ff890e3697bfb9ba905a765e0 (diff)
downloadbcm5719-llvm-5fb3a13ba7523d3a93290bcfa033b835151c19aa.tar.gz
bcm5719-llvm-5fb3a13ba7523d3a93290bcfa033b835151c19aa.zip
Fix the -cxx-abi microsoft -mconstructor-aliases combination.
On the microsoft ABI clang is producing one weak_odr and one linkonce_odr destructor, which is reasonable since only one is required. The fix is simply to move the assert past the special case treatment of linkonce_odr. llvm-svn: 194158
Diffstat (limited to 'clang/lib/CodeGen/CGCXX.cpp')
-rw-r--r--clang/lib/CodeGen/CGCXX.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGCXX.cpp b/clang/lib/CodeGen/CGCXX.cpp
index 15686f7ff6e..eeedaf10643 100644
--- a/clang/lib/CodeGen/CGCXX.cpp
+++ b/clang/lib/CodeGen/CGCXX.cpp
@@ -146,13 +146,13 @@ bool CodeGenModule::TryEmitDefinitionAsAlias(GlobalDecl AliasDecl,
if (!InEveryTU)
return true;
- assert(Linkage == TargetLinkage);
// Instead of creating as alias to a linkonce_odr, replace all of the uses
// of the aliassee.
- if (TargetLinkage == llvm::GlobalValue::LinkOnceODRLinkage) {
+ if (Linkage == llvm::GlobalValue::LinkOnceODRLinkage) {
Replacements[MangledName] = Aliasee;
return false;
}
+ assert(Linkage == TargetLinkage);
}
// Create the alias with no name.
OpenPOWER on IntegriCloud