Introduce MCCodeGenInfo, which keeps information that can affect codegen
[oota-llvm.git] / include / llvm / Target / TargetSelect.h
index 3cccaa80b0e73d21fc0d358d5c3a0d949ee981f7..81fd9c94dcca694a7e1b9d536b863c6f073fa946 100644 (file)
@@ -30,6 +30,10 @@ extern "C" {
   void LLVMInitialize##TargetName##MCAsmInfo();
 #include "llvm/Config/Targets.def"
 
+#define LLVM_TARGET(TargetName) \
+  void LLVMInitialize##TargetName##MCCodeGenInfo();
+#include "llvm/Config/Targets.def"
+
 #define LLVM_TARGET(TargetName) \
   void LLVMInitialize##TargetName##MCInstrInfo();
 #include "llvm/Config/Targets.def"
@@ -91,6 +95,16 @@ namespace llvm {
 #include "llvm/Config/Targets.def"
   }
   
+  /// InitializeAllMCCodeGenInfos - The main program should call this function
+  /// if it wants access to all targets machines that LLVM is configured to
+  /// support, to make them available via the TargetRegistry.
+  ///
+  /// It is legal for a client to make multiple calls to this function.
+  inline void InitializeAllMCCodeGenInfos() {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##MCCodeGenInfo();
+#include "llvm/Config/Targets.def"
+  }
+  
   /// InitializeAllMCInstrInfos - The main program should call this function
   /// if it wants access to all available instruction infos for targets that
   /// LLVM is configured to support, to make them available via the
@@ -164,6 +178,7 @@ namespace llvm {
     LLVM_NATIVE_TARGETINFO();
     LLVM_NATIVE_TARGET();
     LLVM_NATIVE_MCASMINFO();
+    LLVM_NATIVE_MCCODEGENINFO();
     return false;
 #else
     return true;