[PATCH] D135261: [SimplifyLibCalls] Remove invalid code comment in optimizeStringLength. NFC

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 07:06:25 PDT 2022


bjope added a comment.

In D135261#3836686 <https://reviews.llvm.org/D135261#3836686>, @nikic wrote:

> I believe this comment is about supporting arbitrary types, not just extension to wchar.

Alright. I see! So my confusion probably was that it says "i8" rather than "CharSize".

Before commit 50ec0b5dceff1f3fe93 the isGEPBasedOnPointerToString helper did limit this to i8 (but then we did not support CharSize!=8 here), so back then it was really limited to just i8. But nowadays I think the array need to match with "CharSize".
Still, as you say, we aren't supporting arbitrary types for the array elements (they need to match with "CharSize")!


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D135261



More information about the llvm-commits mailing list