[PATCH] D123198: [LibCalls] Add argument extension attributes to more functions.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 11:09:56 PDT 2022


efriedma added a comment.

I guess there are two possibilities in that case:

1. Abandon the transform, as if we don't have an fwrite function.
2. Return the necessary attributes from getOrInsertLibFunc, and make the caller apply them to the call.



================
Comment at: llvm/include/llvm/Transforms/Utils/BuildLibCalls.h:46
+                               Type *RetTy, ArgsTy... Args) {
+    SmallVector<Type*, sizeof...(ArgsTy)> ArgTys{Args...};
+    return getOrInsertLibFunc(M, TLI, TheLibFunc,
----------------
jonpa wrote:
> MaskRay wrote:
> > Consider using a plain array.
> Do you have anything special in mind? This was copied from getOrInsertFunction().
I assume something like `Type *ArgTys[] = {Args...};` should work.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D123198



More information about the llvm-commits mailing list