[llvm] 00ef948 - [AMDGPU] Remove const on a return type. (#168490)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 18 07:17:02 PST 2025
Author: Kazu Hirata
Date: 2025-11-18T07:16:58-08:00
New Revision: 00ef94805a8c3ced416f8854b80452eb7d0bac2a
URL: https://github.com/llvm/llvm-project/commit/00ef94805a8c3ced416f8854b80452eb7d0bac2a
DIFF: https://github.com/llvm/llvm-project/commit/00ef94805a8c3ced416f8854b80452eb7d0bac2a.diff
LOG: [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.
Added:
Modified:
llvm/lib/Target/AMDGPU/AMDGPUSplitModule.cpp
Removed:
################################################################################
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