[PATCH] D135064: [BuildLibCalls] Name types to identify when 'int' and 'size_t' is assumed. NFC

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 3 01:55:37 PDT 2022


bjope created this revision.
Herald added a subscriber: hiraditya.
Herald added a project: All.
bjope requested review of this revision.
Herald added a project: LLVM.

Lots of BuildLibCalls helpers are using Builder::getInt32Ty to get
a type matching an 'int', and DataLayout::getIntPtrType to get a
type matching 'size_t'. The former is not true for all targets, since
and 'int' isn't always 32 bits. And the latter is a bit weird as well
as the definition of DataLayout::getIntPtrType isn't clearly mapping
it to 'size_t'.

This patch is not aiming at solving any such problems. It is merely
highlighting when a libcall is expecting to use 'int' and 'size_t'
by naming the types as IntTy and SizeTTy when preparing the type
signatures for the emitted libcalls.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D135064

Files:
  llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
  llvm/lib/Transforms/Utils/BuildLibCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D135064.464626.patch
Type: text/x-patch
Size: 17981 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221003/16b6eaf2/attachment.bin>


More information about the llvm-commits mailing list