diff options
| author | Eugene Leviant <eleviant@accesssoftek.com> | 2017-12-15 09:18:21 +0000 |
|---|---|---|
| committer | Eugene Leviant <eleviant@accesssoftek.com> | 2017-12-15 09:18:21 +0000 |
| commit | 746f152dd693978742c827482a56bd5e2e441231 (patch) | |
| tree | a296f14e2d522737902329c2a334f5e768b476d5 /llvm/lib | |
| parent | ed46ccbb7ab55dcb97127f6a186fc1fb3a4afd37 (diff) | |
| download | bcm5719-llvm-746f152dd693978742c827482a56bd5e2e441231.tar.gz bcm5719-llvm-746f152dd693978742c827482a56bd5e2e441231.zip | |
[LLVMgold] Don't set undefined symbol as prevailing
Differential revision: https://reviews.llvm.org/D41113
llvm-svn: 320794
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/LTO/LTO.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp index 9c737795b5a..d6b50f551d9 100644 --- a/llvm/lib/LTO/LTO.cpp +++ b/llvm/lib/LTO/LTO.cpp @@ -416,8 +416,11 @@ void LTO::addModuleToGlobalRes(ArrayRef<InputFile::Symbol> Syms, auto &GlobalRes = GlobalResolutions[Sym.getName()]; GlobalRes.UnnamedAddr &= Sym.isUnnamedAddr(); - if (Res.Prevailing) + if (Res.Prevailing) { + assert((GlobalRes.IRName.empty() || !Sym.getIRName().empty()) && + "Overriding existing resolution with undefined asm symbol"); GlobalRes.IRName = Sym.getIRName(); + } // Set the partition to external if we know it is re-defined by the linker // with -defsym or -wrap options, used elsewhere, e.g. it is visible to a |

