I'm having a go at writing an LLVM backend for the WDC 65816. The documentation page on <a href="http://llvm.org/docs/WritingAnLLVMBackend.html">writing an LLVM backend</a> gives this example of target registration:<br>
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    extern "C" void LLVMInitializeSparcTargetInfo() { </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">        RegisterTarget<Triple::sparc, /*HasJIT=*/false></span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">        X(TheSparcTarget, "sparc", "Sparc");</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">    }<br>
</span><br>The part I'm wondering about is Triple::sparc. If I'm writing a target for a different architecture, is it necessary for that architecture to have an entry in Triple's ArchType enumeration? The documentation doesn't seem to mention anything about adding members to the enumeration; is it an optional step? Making lots of small changes outside the specific source tree for the 65816 backend is something I'd prefer to avoid just at the moment, especially since it looks like I'd have to add a fair bit to Triple.cpp as well.  :-)<span style="font-family: courier new,monospace;"></span>