[clang] [CodeGen] Remove extraneous ArrayRef (NFC) (PR #96085)

via cfe-commits cfe-commits at lists.llvm.org
Wed Jun 19 09:07:09 PDT 2024


================
@@ -1200,15 +1200,14 @@ void CodeGenPGO::emitCounterSetOrIncrement(CGBuilderTy &Builder, const Stmt *S,
 
   if (llvm::EnableSingleByteCoverage)
     Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::instrprof_cover),
-                       ArrayRef(Args, 4));
+                       Args);
   else {
     if (!StepV)
       Builder.CreateCall(CGM.getIntrinsic(llvm::Intrinsic::instrprof_increment),
-                         ArrayRef(Args, 4));
+                         Args);
     else
----------------
Sirraide wrote:

Hmm, I don’t think this right though: `Args` contains 5 elements, but we were only using `4` of them here.

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


More information about the cfe-commits mailing list