summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKazu Hirata <kazu@google.com>2025-11-18 07:16:58 -0800
committerGitHub <noreply@github.com>2025-11-18 07:16:58 -0800
commit00ef94805a8c3ced416f8854b80452eb7d0bac2a (patch)
treebbec26b38bfdb99c26a24d97c8f4fbfb15a3f3b5
parent4749cc407114f1e2da591491aacd0a8d3afb54e0 (diff)
[AMDGPU] Remove const on a return type. (#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.
-rw-r--r--llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
index 9af812960542..b7078825928b 100644
--- a/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
+++ b/llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
@@ -314,9 +314,7 @@ public:
#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(); }