Skip to content

[NFC] Shift ZOS libcall declarations to llvm/include #144672

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

jmorse
Copy link
Member

@jmorse jmorse commented Jun 18, 2025

Hola -- in #142622 this ZOS definitions file shifted out of a machine-specific directory to llvm/lib/IR, where it sort of stands out for being the only .def file, and the only OS-specific file. I feel it's better placed in llvm/include/llvm/IR where there are other .def files and declarations for other OS/machine specific things.

In 0a3e9aa this moved to llvm/lib/IR, but other .def files are in the
include directory, so shift it there.
@jmorse jmorse requested review from arsenm, redstar and uweigand June 18, 2025 10:33
@llvmbot
Copy link
Member

llvmbot commented Jun 18, 2025

@llvm/pr-subscribers-llvm-ir

Author: Jeremy Morse (jmorse)

Changes

Hola -- in #142622 this ZOS definitions file shifted out of a machine-specific directory to llvm/lib/IR, where it sort of stands out for being the only .def file, and the only OS-specific file. I feel it's better placed in llvm/include/llvm/IR where there are other .def files and declarations for other OS/machine specific things.


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

2 Files Affected:

  • (renamed) llvm/include/llvm/IR/ZOSLibcallNames.def ()
  • (modified) llvm/lib/IR/RuntimeLibcalls.cpp (+1-1)
diff --git a/llvm/lib/IR/ZOSLibcallNames.def b/llvm/include/llvm/IR/ZOSLibcallNames.def
similarity index 100%
rename from llvm/lib/IR/ZOSLibcallNames.def
rename to llvm/include/llvm/IR/ZOSLibcallNames.def
diff --git a/llvm/lib/IR/RuntimeLibcalls.cpp b/llvm/lib/IR/RuntimeLibcalls.cpp
index 7396626a03d41..7e810b2857985 100644
--- a/llvm/lib/IR/RuntimeLibcalls.cpp
+++ b/llvm/lib/IR/RuntimeLibcalls.cpp
@@ -609,7 +609,7 @@ void RuntimeLibcallsInfo::initLibcalls(const Triple &TT) {
     };
     static RTLibCallMapping RTLibCallCommon[] = {
 #define HANDLE_LIBCALL(code, name) {RTLIB::code, name},
-#include "ZOSLibcallNames.def"
+#include "llvm/IR/ZOSLibcallNames.def"
     };
     for (auto &E : RTLibCallCommon)
       setLibcallName(E.Code, E.Name);

Copy link
Contributor

@arsenm arsenm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't bother touching this, I have a stack of patches to replace this all with tablegen

@jmorse
Copy link
Member Author

jmorse commented Jun 18, 2025

Very good!

@jmorse jmorse closed this Jun 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants