[llvm] [AMDGPU] Remove const on a return type. (PR #168490)
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 17 22:24:26 PST 2025
https://github.com/kazutakahirata created https://github.com/llvm/llvm-project/pull/168490
While I am at it, this patch switches to the constructor that takes
a container instead of a pair of begin/end.
Identified with readability-const-return-type.
>From 3d65bbd17c4866c0a3298953fc2cd048a41b7694 Mon Sep 17 00:00:00 2001
From: Kazu Hirata <kazu at google.com>
Date: Sun, 16 Nov 2025 22:51:28 -0800
Subject: [PATCH] [AMDGPU] Remove const on a return type.
While I am at it, this patch switches to the constructor that takes
a container instead of a pair of begin/end.
Identified with readability-const-return-type.
---
llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
index 9af812960542c..b7078825928be 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
@@ -314,9 +314,7 @@ class SplitGraph {
#endif
bool empty() const { return Nodes.empty(); }
- const iterator_range<nodes_iterator> nodes() const {
- return {Nodes.begin(), Nodes.end()};
- }
+ iterator_range<nodes_iterator> nodes() const { return Nodes; }
const Node &getNode(unsigned ID) const { return *Nodes[ID]; }
unsigned getNumNodes() const { return Nodes.size(); }
More information about the llvm-commits
mailing list