[llvm] 94384ae - RuntimeLibcalls: Fix missing const on getLibcallNames (#143074)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 6 07:11:06 PDT 2025
Author: Matt Arsenault
Date: 2025-06-06T23:11:02+09:00
New Revision: 94384ae2bd086fd151933b7c80bd1baa6a9ec4fe
URL: https://github.com/llvm/llvm-project/commit/94384ae2bd086fd151933b7c80bd1baa6a9ec4fe
DIFF: https://github.com/llvm/llvm-project/commit/94384ae2bd086fd151933b7c80bd1baa6a9ec4fe.diff
LOG: RuntimeLibcalls: Fix missing const on getLibcallNames (#143074)
This is made simpler by just returning the array ref instead of
the fancy range.
Added:
Modified:
llvm/include/llvm/IR/RuntimeLibcalls.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/IR/RuntimeLibcalls.h b/llvm/include/llvm/IR/RuntimeLibcalls.h
index 89e466ee5933d..051bcc147cb71 100644
--- a/llvm/include/llvm/IR/RuntimeLibcalls.h
+++ b/llvm/include/llvm/IR/RuntimeLibcalls.h
@@ -81,9 +81,9 @@ struct RuntimeLibcallsInfo {
return LibcallCallingConvs[Call];
}
- iterator_range<const char **> getLibcallNames() {
- return llvm::make_range(LibcallRoutineNames,
- LibcallRoutineNames + RTLIB::UNKNOWN_LIBCALL);
+ ArrayRef<const char *> getLibcallNames() const {
+ // Trim UNKNOWN_LIBCALL from the end
+ return ArrayRef(LibcallRoutineNames).drop_back();
}
private:
More information about the llvm-commits
mailing list