[clang] [CodeGen] Remove extraneous ArrayRef (NFC) (PR #96085)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Jun 19 08:47:03 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
@llvm/pr-subscribers-clang-codegen
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
ArrayRef can infer the size of a C array. Also, C arrays can be
implicitly cast to ArrayRef.
---
Full diff: https://github.com/llvm/llvm-project/pull/96085.diff
1 Files Affected:
- (modified) clang/lib/CodeGen/CodeGenPGO.cpp (+3-4)
``````````diff
diff --git a/clang/lib/CodeGen/CodeGenPGO.cpp b/clang/lib/CodeGen/CodeGenPGO.cpp
index 2839697614595..f2cdeb5796d3a 100644
--- a/clang/lib/CodeGen/CodeGenPGO.cpp
+++ b/clang/lib/CodeGen/CodeGenPGO.cpp
@@ -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
Builder.CreateCall(
- CGM.getIntrinsic(llvm::Intrinsic::instrprof_increment_step),
- ArrayRef(Args));
+ CGM.getIntrinsic(llvm::Intrinsic::instrprof_increment_step), Args);
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/96085
More information about the cfe-commits
mailing list