[PATCH] D12829: [LLD] Corrected error message if a section failed to load

Rafael EspĂ­ndola via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 12 08:55:16 PDT 2015


Is it possible to add a testcase?
On Sep 12, 2015 11:50 AM, "Igor Kudrin" <ikudrin.dev at gmail.com> wrote:

> ikudrin created this revision.
> ikudrin added reviewers: rafael, ruiu.
> ikudrin added a subscriber: llvm-commits.
> ikudrin added a project: lld.
>
> There is no sense to use Name in these lines as it is not initialized yet.
>
> http://reviews.llvm.org/D12829
>
> Files:
>   lld/trunk/COFF/InputFiles.cpp
>
> Index: lld/trunk/COFF/InputFiles.cpp
> ===================================================================
> --- lld/trunk/COFF/InputFiles.cpp
> +++ lld/trunk/COFF/InputFiles.cpp
> @@ -115,9 +115,9 @@
>      const coff_section *Sec;
>      StringRef Name;
>      std::error_code EC = COFFObj->getSection(I, Sec);
> -    error(EC, Twine("getSection failed: ") + Name);
> +    error(EC, Twine("getSection failed: #") + Twine(I));
>      EC = COFFObj->getSectionName(Sec, Name);
> -    error(EC, Twine("getSectionName failed: ") + Name);
> +    error(EC, Twine("getSectionName failed: #") + Twine(I));
>      if (Name == ".sxdata") {
>        SXData = Sec;
>        continue;
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150912/e165322d/attachment.html>


More information about the llvm-commits mailing list