[clang] [CodeGen] Use llvm::reverse (NFC) (PR #133550)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 28 18:34:14 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Kazu Hirata (kazutakahirata)
<details>
<summary>Changes</summary>
---
Full diff: https://github.com/llvm/llvm-project/pull/133550.diff
1 Files Affected:
- (modified) clang/lib/CodeGen/CGCall.cpp (+1-1)
``````````diff
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 7aa77e55dbfcc..3a1db4f1a7a90 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -3633,7 +3633,7 @@ static llvm::StoreInst *findDominatingStoreToReturnValue(CodeGenFunction &CGF) {
// Look at directly preceding instruction, skipping bitcasts, lifetime
// markers, and fake uses and their operands.
const llvm::Instruction *LoadIntoFakeUse = nullptr;
- for (llvm::Instruction &I : make_range(IP->rbegin(), IP->rend())) {
+ for (llvm::Instruction &I : llvm::reverse(*IP)) {
// Ignore instructions that are just loads for fake uses; the load should
// immediately precede the fake use, so we only need to remember the
// operand for the last fake use seen.
``````````
</details>
https://github.com/llvm/llvm-project/pull/133550
More information about the cfe-commits
mailing list