[PATCH] D70659: [ELF] Allow getErrPlace() to work before Out::bufferStart is set

Alexander Richardson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 2 02:59:36 PST 2019


arichardson marked an inline comment as done.
arichardson added inline comments.


================
Comment at: lld/ELF/Target.cpp:103
+            : isec->data().data();
     if (isecLoc <= loc && loc < isecLoc + isec->getSize())
       return {isec, isec->template getLocation<ELFT>(loc - isecLoc) + ": "};
----------------
ruiu wrote:
> If Out::bufferStart is a nullptr, does this `if` statement always succeed?
I don't believe so, since `isec->data().data()` will only be in range for the matching input section


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70659/new/

https://reviews.llvm.org/D70659





More information about the llvm-commits mailing list