[PATCH] D110584: [Analysis] Be defensive when matching size_t in lib call signatures
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 27 14:03:04 PDT 2021
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:734
// sizeof(int*) for every target. So the assumption used here to derive the
// SizeTTy based on DataLayout and getIntPtrType isn't always valid.
Type *SizeTTy = DL ? DL->getIntPtrType(Ctx, /*AddressSpace=*/0) : nullptr;
----------------
As a side note, I believe this should really be using the integer type with width DL.getIndexSizeInBits(). Basically pointer size = intptr_t and index size = size_t.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D110584/new/
https://reviews.llvm.org/D110584
More information about the llvm-commits
mailing list