diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-06 19:18:55 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2013-11-06 19:18:55 +0000 |
commit | 5fb3a13ba7523d3a93290bcfa033b835151c19aa (patch) | |
tree | 42ff9bbfc791f2c6ff5833ef4c664a7c3da7d060 /clang/lib/CodeGen/CGCXX.cpp | |
parent | 05b7b37021b3601ff890e3697bfb9ba905a765e0 (diff) | |
download | bcm5719-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.cpp | 4 |
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. |