summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/ELFObjectWriter.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2017-06-22 17:25:35 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2017-06-22 17:25:35 +0000
commit8a261c2565b377bd00dee3ac2fe1fa075cb910e4 (patch)
tree0790b7d8bd102c555b213ba603a159dda423b8f9 /llvm/lib/MC/ELFObjectWriter.cpp
parentf677966e2eb5c7fd65a77ec59dc90bcda1c5239d (diff)
downloadbcm5719-llvm-8a261c2565b377bd00dee3ac2fe1fa075cb910e4.tar.gz
bcm5719-llvm-8a261c2565b377bd00dee3ac2fe1fa075cb910e4.zip
Add a common error checking for some invalid expressions.
This refactors a bit of duplicated code and fixes an assertion failure on ELF. llvm-svn: 306035
Diffstat (limited to 'llvm/lib/MC/ELFObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/ELFObjectWriter.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/llvm/lib/MC/ELFObjectWriter.cpp b/llvm/lib/MC/ELFObjectWriter.cpp
index 4d139132df4..30f35782680 100644
--- a/llvm/lib/MC/ELFObjectWriter.cpp
+++ b/llvm/lib/MC/ELFObjectWriter.cpp
@@ -633,9 +633,6 @@ void ELFObjectWriter::recordRelocation(MCAssembler &Asm,
MCContext &Ctx = Asm.getContext();
if (const MCSymbolRefExpr *RefB = Target.getSymB()) {
- assert(RefB->getKind() == MCSymbolRefExpr::VK_None &&
- "Should not have constructed this");
-
// Let A, B and C being the components of Target and R be the location of
// the fixup. If the fixup is not pcrel, we want to compute (A - B + C).
// If it is pcrel, we want to compute (A - B + C - R).
OpenPOWER on IntegriCloud