[llvm] [llvm-ifs] Handle more e_machine values for --target (PR #128559)
Roland McGrath via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 25 11:52:37 PST 2025
================
@@ -2018,6 +2019,9 @@ uint16_t convertArchNameToEMachine(StringRef Arch);
/// Convert an ELF's e_machine value into an architecture name.
StringRef convertEMachineToArchName(uint16_t EMachine);
+// Convert a triple's architecture to ELF's e_machine value.
+uint16_t convertTripleArchTypeToEMachine(Triple::ArchType ArchType);
----------------
frobtech wrote:
There is `ELFObjectFile::getArch()` going in the other direction, with pretty minimal coverage.
AFAICT the actual emission is set by each `MCELFObjectTargetWriter` subclass's constructor.
I don't really see any straightforward way to share a single source of truth there.
https://github.com/llvm/llvm-project/pull/128559
More information about the llvm-commits
mailing list