[PATCH] D23560: [RISCV 3/10] Add stub backend

Alex Bradbury via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 26 05:18:06 PDT 2016


asb added inline comments.

================
Comment at: lib/Target/RISCV/TargetInfo/RISCVTargetInfo.cpp:27
@@ +26,2 @@
+// to succeed. Remove once this function is properly implemented.
+extern "C" void LLVMInitializeRISCVTargetMC() {}
----------------
reames wrote:
> Might want to add an assert(false && "not yet implemented").
`llvm_unreachable` would be even better. However in this specific case we actually need to define LLVMInitializeRISCVTargetMC as a no-op. llc will call the initialisation functions for all backends that were compiled in, so if this function is made to assert it means that all codegen tests for other archs will fail.

I've modified the comment to be clear it's not purely a matter of being present for linking.


https://reviews.llvm.org/D23560





More information about the llvm-commits mailing list