diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2014-01-30 21:13:05 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2014-01-30 21:13:05 +0000 |
commit | 4e54e6fe755c54c444687f9d0d2e657982aa8e1c (patch) | |
tree | 1fde9914c79b1d342c6abd905c4daf43e2d50a3b /lib | |
parent | 6420c1109328813ddd6eec03c510ac7ae46249fb (diff) | |
download | llvm-4e54e6fe755c54c444687f9d0d2e657982aa8e1c.tar.gz llvm-4e54e6fe755c54c444687f9d0d2e657982aa8e1c.tar.bz2 llvm-4e54e6fe755c54c444687f9d0d2e657982aa8e1c.tar.xz |
Fix PR18381 - print a minimal diagnostic rather than assert on unresolved .secidx target
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200490 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/MC/WinCOFFObjectWriter.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/MC/WinCOFFObjectWriter.cpp b/lib/MC/WinCOFFObjectWriter.cpp index ed19b7ec69..b68e69f2eb 100644 --- a/lib/MC/WinCOFFObjectWriter.cpp +++ b/lib/MC/WinCOFFObjectWriter.cpp @@ -636,6 +636,11 @@ void WinCOFFObjectWriter::RecordRelocation(const MCAssembler &Asm, const MCSymbol &Symbol = Target.getSymA()->getSymbol(); const MCSymbol &A = Symbol.AliasedSymbol(); + if (!Asm.hasSymbolData(A)) + Asm.getContext().FatalError( + Fixup.getLoc(), + Twine("symbol '") + A.getName() + "' can not be undefined"); + MCSymbolData &A_SD = Asm.getSymbolData(A); MCSectionData const *SectionData = Fragment->getParent(); |