forked from OSchip/llvm-project
460efc1fb8
When TargetLibraryInfoImpl::isValidProtoForLibFunc is checking function signatures to detect lib calls it may check that a parameter or return value matches with the "size_t" type. For this to work it has to derive the IR type matching with "size_t". Depending on if a DataLayout is provided or not, this has been done in two different way. Either a more strict check being based on IntPtrType (which is given by the DataLayout) or a more relaxed check assuming that any integer type matches with "size_t". Given that the stricter approach exist it seems like we do not want to trigger rewrites etc if we aren't sure that a function calls actually match with the library function. Therefore it was questioned why we actually have the more relaxed approach when not being able to derive an IR type for "size_t". This patch will take a more defensive approach, requiring that a DataLayout is passed to isValidProtoForLibFunc. Differential Revision: https://reviews.llvm.org/D110584 |
||
---|---|---|
.. | ||
llvm | ||
llvm-c |