summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2014-01-30 21:13:05 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2014-01-30 21:13:05 +0000
commit3e4ac4eecaf7bde92b853580cd377dc79a568758 (patch)
tree85b99b7a94982a01b41648fd3b0f088785502fb4 /llvm/lib
parent10c0ef7b8aaae3b7a6210b181544f2f6979d149c (diff)
downloadbcm5719-llvm-3e4ac4eecaf7bde92b853580cd377dc79a568758.tar.gz
bcm5719-llvm-3e4ac4eecaf7bde92b853580cd377dc79a568758.zip
Fix PR18381 - print a minimal diagnostic rather than assert on unresolved .secidx target
llvm-svn: 200490
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/MC/WinCOFFObjectWriter.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/MC/WinCOFFObjectWriter.cpp b/llvm/lib/MC/WinCOFFObjectWriter.cpp
index ed19b7ec69d..b68e69f2eb3 100644
--- a/llvm/lib/MC/WinCOFFObjectWriter.cpp
+++ b/llvm/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();
OpenPOWER on IntegriCloud