[lld] r299021 - Revert r298815: Do not use assert to report broken input files.
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 29 12:35:47 PDT 2017
Author: ruiu
Date: Wed Mar 29 14:35:44 2017
New Revision: 299021
URL: http://llvm.org/viewvc/llvm-project?rev=299021&view=rev
Log:
Revert r298815: Do not use assert to report broken input files.
This reverts commit because this really shouldn't happen unless
there's a bug in LLD.
Modified:
lld/trunk/ELF/Relocations.cpp
Modified: lld/trunk/ELF/Relocations.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/Relocations.cpp?rev=299021&r1=299020&r2=299021&view=diff
==============================================================================
--- lld/trunk/ELF/Relocations.cpp (original)
+++ lld/trunk/ELF/Relocations.cpp Wed Mar 29 14:35:44 2017
@@ -686,10 +686,8 @@ public:
if (I == Size)
return Off;
- if (Off < P[I].InputOff) {
- error("relocation not in any piece");
- return -1;
- }
+ // P must be contiguous, so there must be no holes in between.
+ assert(P[I].InputOff <= Off && "Relocation not in any piece");
// Offset -1 means that the piece is dead (i.e. garbage collected).
if (P[I].OutputOff == -1)
More information about the llvm-commits
mailing list