Trailing whitespace.
[oota-llvm.git] / include / llvm / Target / TargetSelect.h
index 589c7cf17b6a53dde303591f216d5e6ade3978a9..1891f879741a147e9c57def3f68d6fb29daad8c8 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef LLVM_TARGET_TARGETSELECT_H
 #define LLVM_TARGET_TARGETSELECT_H
 
+#include "llvm/Config/llvm-config.h"
+
 extern "C" {
   // Declare all of the target-initialization functions that are available.
 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
@@ -98,15 +100,10 @@ namespace llvm {
   /// It is legal for a client to make multiple calls to this function.
   inline bool InitializeNativeTarget() {
   // If we have a native target, initialize it to ensure it is linked in.
-#ifdef LLVM_NATIVE_ARCHNAME
-#define DoInit2(TARG) \
-    LLVMInitialize ## TARG ## Info ();          \
-    LLVMInitialize ## TARG ()
-#define DoInit(T) DoInit2(T)
-    DoInit(LLVM_NATIVE_ARCH);
+#ifdef LLVM_NATIVE_TARGET
+    LLVM_NATIVE_TARGETINFO();
+    LLVM_NATIVE_TARGET();
     return false;
-#undef DoInit
-#undef DoInit2
 #else
     return true;
 #endif
@@ -116,14 +113,9 @@ namespace llvm {
   /// this function to initialize the native target asm printer.
   inline bool InitializeNativeTargetAsmPrinter() {
   // If we have a native target, initialize the corresponding asm printer.
-#ifdef LLVM_NATIVE_ARCH
-#define DoInit2(TARG) \
-    LLVMInitialize ## TARG ## AsmPrinter ();
-#define DoInit(T) DoInit2(T)
-    DoInit(LLVM_NATIVE_ARCHNAME);
+#ifdef LLVM_NATIVE_ASMPRINTER
+    LLVM_NATIVE_ASMPRINTER();
     return false;
-#undef DoInit
-#undef DoInit2
 #else
     return true;
 #endif