[PATCH] D14382: [ELF2] - Basic implementation of -r/--relocatable

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 22 11:19:51 PST 2016


I just tried applying this patch. I noticed two things:

* It is not git-clang-format clean. In particular some lines are more
than 80 chars long.
* It doesn't compile on linux:

/home/espindola/llvm/llvm/tools/lld/ELF/OutputSections.h:306:53:
error: unknown type name 'uintX_t'; did you mean 'uint8_t'?
  StaticRelocSection(StringRef Name, uint32_t Type, uintX_t Flags, bool IsRela);
                                                    ^~~~~~~
                                                    uint8_t


On 22 February 2016 at 14:03, Rafael EspĂ­ndola
<rafael.espindola at gmail.com> wrote:
>> ----------------
>> rafael wrote:
>>> Can you get here? If so, add a test, if not, use an assert.
>> I just assumed that users who will try linker probably will use the release version. So if them meet that error situation, there is no way they see the assert, it will not be debug build for them.
>> error() is universal way to prompt here. I would use it or fatal() here.
>
> If it cannot be reached this is dead code and should be an assert.
> Never add an error or fatal that cannot actually happen.
>
> Cheers,
> Rafael


More information about the llvm-commits mailing list