[PATCH] D86879: [XCOFF][AIX] Handle TOC entries that could not be reached by positive range in small code model

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 3 09:11:11 PDT 2020


jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:588
+    const auto TOCEntryIter = TOC.find(MOSymbol);
+    assert(TOCEntryIter != TOC.end() &&
+           "Could not find the TOC entry for this symbol.");
----------------
Xiangling_L wrote:
> The assertion here seems a bit unnecessary, since `lookUpOrCreateTOCEntry` will always return us a TOCEntry.
I put the assertion here as a defensive mechanism in case the code get move around in the future and someone calls this function before `lookUpOrCreateTOCEntry`.


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

https://reviews.llvm.org/D86879



More information about the llvm-commits mailing list