[llvm-commits] [llvm] r75756 - /llvm/trunk/include/llvm/Target/TargetSelect.h

Daniel Dunbar daniel at zuster.org
Wed Jul 15 00:48:39 PDT 2009


Author: ddunbar
Date: Wed Jul 15 02:48:39 2009
New Revision: 75756

URL: http://llvm.org/viewvc/llvm-project?rev=75756&view=rev
Log:
Include Target specific Info initialization routine when initializing all
targets.

Modified:
    llvm/trunk/include/llvm/Target/TargetSelect.h

Modified: llvm/trunk/include/llvm/Target/TargetSelect.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetSelect.h?rev=75756&r1=75755&r2=75756&view=diff

==============================================================================
--- llvm/trunk/include/llvm/Target/TargetSelect.h (original)
+++ llvm/trunk/include/llvm/Target/TargetSelect.h Wed Jul 15 02:48:39 2009
@@ -1,4 +1,4 @@
-//===- TargetSelect.h - Target Selection & Registration -------------------===//
+//===- TargetSelect.h - Target Selection & Registration ---------*- C++ -*-===//
 //
 //                     The LLVM Compiler Infrastructure
 //
@@ -20,6 +20,9 @@
 
 extern "C" {
   // Declare all of the target-initialization functions that are available.
+#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
+#include "llvm/Config/Targets.def"
+
 #define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
 #include "llvm/Config/Targets.def"
   
@@ -30,8 +33,13 @@
 
 namespace llvm {
   /// InitializeAllTargets - The main program should call this function if it
-  /// wants to link in all available targets that LLVM is configured to support.
+  /// wants access to all available targets that LLVM is configured to
+  /// support. This allows the client to query the available targets using the
+  /// target registration mechanisms.
   inline void InitializeAllTargets() {
+#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
+#include "llvm/Config/Targets.def"
+
 #define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
 #include "llvm/Config/Targets.def"
   }





More information about the llvm-commits mailing list