[llvm] RuntimeLibcalls: Fix missing const on getLibcallNames (PR #143074)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 23:10:07 PDT 2025


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-ir

Author: Matt Arsenault (arsenm)

<details>
<summary>Changes</summary>

This is made simpler by just returning the array ref instead of
the fancy range.

---
Full diff: https://github.com/llvm/llvm-project/pull/143074.diff


1 Files Affected:

- (modified) llvm/include/llvm/IR/RuntimeLibcalls.h (+1-4) 


``````````diff
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.h b/llvm/include/llvm/IR/RuntimeLibcalls.h
index 26c085031a48a..a16c317fd8d41 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.h
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.h
@@ -68,10 +68,7 @@ struct RuntimeLibcallsInfo {
     return LibcallCallingConvs[Call];
   }
 
-  iterator_range<const char **> getLibcallNames() {
-    return llvm::make_range(LibcallRoutineNames,
-                            LibcallRoutineNames + RTLIB::UNKNOWN_LIBCALL);
-  }
+  ArrayRef<const char *> getLibcallNames() const { return LibcallRoutineNames; }
 
 private:
   /// Stores the name each libcall.

``````````

</details>


https://github.com/llvm/llvm-project/pull/143074


More information about the llvm-commits mailing list