[BuildLibCalls] Name types to identify when 'int' and 'size_t' is assumed. NFC
authorBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Wed, 28 Sep 2022 20:18:59 +0000 (22:18 +0200)
committerBjorn Pettersson <bjorn.a.pettersson@ericsson.com>
Tue, 4 Oct 2022 10:52:05 +0000 (12:52 +0200)
commit73e8d95d28f8afa6f45cd0830641f62025584c07
tree285164bf4efa67eb07e411509b305109b8de5655
parent825e16969eb7036873b6137cfb0ebc37b1f64798
[BuildLibCalls] Name types to identify when 'int' and 'size_t' is assumed. NFC

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.

Differential Revision: https://reviews.llvm.org/D135064
llvm/include/llvm/Transforms/Utils/BuildLibCalls.h
llvm/lib/Transforms/Utils/BuildLibCalls.cpp