[clang] [CodeGen] Use llvm::reverse (NFC) (PR #133550)
Kazu Hirata via cfe-commits
cfe-commits at lists.llvm.org
Fri Mar 28 18:33:42 PDT 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/133550
None
>From 9d1f0d61d9caffdf9021861bbfef39247c4cfb74 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Thu, 27 Mar 2025 21:16:15 -0700
Subject: [PATCH] [CodeGen] Use llvm::reverse (NFC)
---
clang/lib/CodeGen/CGCall.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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.
More information about the cfe-commits
mailing list