[llvm-commits] [gcc-plugin] r76569 - /gcc-plugin/trunk/llvm-backend.cpp

Duncan Sands baldrick at free.fr
Tue Jul 21 05:22:27 PDT 2009


Author: baldrick
Date: Tue Jul 21 07:22:25 2009
New Revision: 76569

URL: http://llvm.org/viewvc/llvm-project?rev=76569&view=rev
Log:
Determine the target from the target header.  Turn
off subfeatures for the moment (doesn't compile).

Modified:
    gcc-plugin/trunk/llvm-backend.cpp

Modified: gcc-plugin/trunk/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-backend.cpp?rev=76569&r1=76568&r2=76569&view=diff

==============================================================================
--- gcc-plugin/trunk/llvm-backend.cpp (original)
+++ gcc-plugin/trunk/llvm-backend.cpp Tue Jul 21 07:22:25 2009
@@ -87,6 +87,7 @@
 // Plugin headers
 #include "llvm-internal.h"
 #include "llvm-debug.h"
+#include "llvm-target.h"
 //TODO#include "llvm-file-ostream.h"
 #include "bits_and_bobs.h"
 
@@ -346,9 +347,6 @@
   }
 }
 
-// FIXME: For the moment, all the world's an x86
-#define LLVM_TARGET_NAME X86
-
 #ifndef LLVM_TARGET_NAME
 #error LLVM_TARGET_NAME macro not specified by GCC backend
 #endif
@@ -496,13 +494,13 @@
 
   // Figure out the subtarget feature string we pass to the target.
   std::string FeatureStr;
-  // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM
-  // backend.
-#ifdef LLVM_SET_SUBTARGET_FEATURES
-  SubtargetFeatures Features;
-  LLVM_SET_SUBTARGET_FEATURES(Features);
-  FeatureStr = Features.getString();
-#endif
+//TODO  // The target can set LLVM_SET_SUBTARGET_FEATURES to configure the LLVM
+//TODO  // backend.
+//TODO#ifdef LLVM_SET_SUBTARGET_FEATURES
+//TODO  SubtargetFeatures Features;
+//TODO  LLVM_SET_SUBTARGET_FEATURES(Features);
+//TODO  FeatureStr = Features.getString();
+//TODO#endif
   TheTarget = TME->createTargetMachine(*TheModule, FeatureStr);
   assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN);
 





More information about the llvm-commits mailing list