"division by zero" or "modulo by zero" are not
very informative errors and even probably confusing
as does not let to know that error is coming from linker script.
Patch adds location reporting.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
ELF/ScriptParser.cpp | ||
---|---|---|
815–823 ↗ | (On Diff #136485) | You probably should inline these functions. They are called only once. |
ELF/ScriptParser.cpp | ||
---|---|---|
815–823 ↗ | (On Diff #136485) | Do you mean following ? return [=] { return mod(L(), R(), getCurrentLocation()); }; It is not the same. Functor is called much later, and location will be unavailable, |
ELF/ScriptParser.cpp | ||
---|---|---|
815–823 ↗ | (On Diff #136485) | No what I mean is to inline div and mod here. |
ELF/ScriptParser.cpp | ||
---|---|---|
815–823 ↗ | (On Diff #136485) | Ah, OK. Will update diff tomorrow with that change, thanks ! |
Comment Actions
LGTM
ELF/ScriptParser.cpp | ||
---|---|---|
808 ↗ | (On Diff #136687) | nit: my preference is to use -> uint64_t instead of type casting a return value. |