[PATCH] D27097: [ELF] Refactor target errors

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 28 06:40:54 PST 2016


ruiu accepted this revision.
ruiu added a comment.
This revision is now accepted and ready to land.

LGTM. Nice!



================
Comment at: ELF/Writer.cpp:1571
+    if (ISLoc <= Loc && ISLoc + IS->getSize() > Loc) {
+      ErrLoc = IS->getLocation(Loc - ISLoc);
+      break;
----------------
You can return `IS->getLocation(Loc - ISLoc) + ": "` here.


================
Comment at: ELF/Writer.cpp:1575
+  }
+  return ErrLoc.empty() ? ErrLoc : ErrLoc + ": ";
+}
----------------
and `return ""` here.


================
Comment at: ELF/Writer.h:14
 #include "llvm/ADT/StringRef.h"
+#include "llvm/ADT/Twine.h"
 #include <cstdint>
----------------
Do you need this?


https://reviews.llvm.org/D27097





More information about the llvm-commits mailing list