[llvm-commits] [gcc-plugin] r75907 - /gcc-plugin/trunk/llvm-plugin.cpp

Duncan Sands baldrick at free.fr
Thu Jul 16 05:42:50 PDT 2009


Author: baldrick
Date: Thu Jul 16 07:42:49 2009
New Revision: 75907

URL: http://llvm.org/viewvc/llvm-project?rev=75907&view=rev
Log:
Changes needed to compile now that the way target
machines are registered has changed.

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

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

==============================================================================
--- gcc-plugin/trunk/llvm-plugin.cpp (original)
+++ gcc-plugin/trunk/llvm-plugin.cpp Thu Jul 16 07:42:49 2009
@@ -25,7 +25,7 @@
 #include "llvm/Support/TargetFolder.h"
 #include "llvm/Target/TargetData.h"
 #include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetMachineRegistry.h"
+#include "llvm/Target/TargetRegistry.h"
 
 // System headers
 #include <iostream>
@@ -179,8 +179,8 @@
   // Create the TargetMachine we will be generating code with.
   // FIXME: Figure out how to select the target and pass down subtarget info.
   std::string Err;
-  const TargetMachineRegistry::entry *TME =
-    TargetMachineRegistry::getClosestStaticTargetForModule(*TheModule, Err);
+  const Target *TME =
+    TargetRegistry::getClosestStaticTargetForModule(*TheModule, Err);
   if (!TME) {
     cerr << "Did not get a target machine! Triplet is " << TargetTriple << '\n';
     exit(1);
@@ -195,7 +195,7 @@
 //TODO  LLVM_SET_SUBTARGET_FEATURES(Features);
 //TODO  FeatureStr = Features.getString();
 //TODO#endif
-  TheTarget = TME->CtorFn(*TheModule, FeatureStr);
+  TheTarget = TME->createTargetMachine(*TheModule, FeatureStr);
   assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN);
 
   TheFolder = new TargetFolder(TheTarget->getTargetData(), getGlobalContext());





More information about the llvm-commits mailing list