aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/LTO/LTO.cpp
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2024-07-20 12:02:48 +0900
committerNAKAMURA Takumi <geek4civic@gmail.com>2024-07-20 12:36:57 +0900
commit740161a9b98c9920dedf1852b5f1c94d0a683af5 (patch)
tree67013231edbc048819f86aff973c313466f034d9 /llvm/lib/LTO/LTO.cpp
parent2d756d9d4c89ac50404f942f2db2f4a402aa0e00 (diff)
downloadllvm-740161a9b98c9920dedf1852b5f1c94d0a683af5.zip
llvm-740161a9b98c9920dedf1852b5f1c94d0a683af5.tar.gz
llvm-740161a9b98c9920dedf1852b5f1c94d0a683af5.tar.bz2
Revert "[LLVM][LTO] Factor out RTLib calls and allow them to be dropped (#98512)"
This reverts commit c05126bdfc3b02daa37d11056fa43db1a6cdef69. (llvmorg-19-init-17714-gc05126bdfc3b) See #99610
Diffstat (limited to 'llvm/lib/LTO/LTO.cpp')
-rw-r--r--llvm/lib/LTO/LTO.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/LTO/LTO.cpp b/llvm/lib/LTO/LTO.cpp
index d303f22..4ffacbb 100644
--- a/llvm/lib/LTO/LTO.cpp
+++ b/llvm/lib/LTO/LTO.cpp
@@ -30,7 +30,6 @@
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/Mangler.h"
#include "llvm/IR/Metadata.h"
-#include "llvm/IR/RuntimeLibcalls.h"
#include "llvm/LTO/LTOBackend.h"
#include "llvm/LTO/SummaryBasedOptimizations.h"
#include "llvm/Linker/IRMover.h"
@@ -1358,13 +1357,14 @@ Error LTO::runRegularLTO(AddStreamFn AddStream) {
return finalizeOptimizationRemarks(std::move(DiagnosticOutputFile));
}
-SmallVector<const char *> LTO::getRuntimeLibcallSymbols(const Triple &TT) {
- RTLIB::RuntimeLibcallsInfo Libcalls(TT);
+static const char *libcallRoutineNames[] = {
+#define HANDLE_LIBCALL(code, name) name,
+#include "llvm/IR/RuntimeLibcalls.def"
+#undef HANDLE_LIBCALL
+};
- SmallVector<const char *> LibcallSymbols;
- copy_if(Libcalls.getLibcallNames(), std::back_inserter(LibcallSymbols),
- [](const char *Name) { return Name; });
- return LibcallSymbols;
+ArrayRef<const char*> LTO::getRuntimeLibcallSymbols() {
+ return ArrayRef(libcallRoutineNames);
}
/// This class defines the interface to the ThinLTO backend.