[llvm] [llvm][opt][Transforms] Replacement `calloc` should match replaced `malloc` (PR #110524)

Alex Voicu via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 30 10:59:28 PDT 2024


================
@@ -251,7 +251,7 @@ namespace llvm {
 
   /// Emit a call to the calloc function.
   Value *emitCalloc(Value *Num, Value *Size, IRBuilderBase &B,
-                    const TargetLibraryInfo &TLI);
+                    const TargetLibraryInfo &TLI, unsigned AddrSpace = 0);
----------------
AlexVlx wrote:

We can, I did not because it seems that most interfaces pass it as a defaulted parameter. I do agree with you that it'd be better not to do that though, and since this is only caller in one place, the impact is limited.

https://github.com/llvm/llvm-project/pull/110524


More information about the llvm-commits mailing list