[llvm-commits] [llvm-gcc-4.2] r75800 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-linker-hack.cpp
Stuart Hastings
stuart at apple.com
Wed Jul 15 10:29:37 PDT 2009
Author: stuart
Date: Wed Jul 15 12:29:37 2009
New Revision: 75800
URL: http://llvm.org/viewvc/llvm-project?rev=75800&view=rev
Log:
Revert 75770 to go with recent llvm reversion.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=75800&r1=75799&r2=75800&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Wed Jul 15 12:29:37 2009
@@ -40,7 +40,7 @@
#include "llvm/Target/TargetData.h"
#include "llvm/Target/TargetLowering.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetRegistry.h"
+#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/IPO.h"
@@ -337,7 +337,6 @@
namespace llvm {
#define Declare2(TARG, MOD) extern "C" void LLVMInitialize ## TARG ## MOD()
#define Declare(T, M) Declare2(T, M)
- Declare(LLVM_TARGET_NAME, TargetInfo);
Declare(LLVM_TARGET_NAME, Target);
Declare(LLVM_TARGET_NAME, AsmPrinter);
#undef Declare
@@ -348,7 +347,6 @@
// Initialize the LLVM backend.
#define DoInit2(TARG, MOD) LLVMInitialize ## TARG ## MOD()
#define DoInit(T, M) DoInit2(T, M)
- DoInit(LLVM_TARGET_NAME, TargetInfo);
DoInit(LLVM_TARGET_NAME, Target);
DoInit(LLVM_TARGET_NAME, AsmPrinter);
#undef DoInit
@@ -451,8 +449,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 Target *TME =
- TargetRegistry::getClosestStaticTargetForModule(*TheModule, Err);
+ const TargetMachineRegistry::entry *TME =
+ TargetMachineRegistry::getClosestStaticTargetForModule(*TheModule, Err);
if (!TME) {
cerr << "Did not get a target machine! Triplet is " << TargetTriple << '\n';
exit(1);
@@ -467,7 +465,7 @@
LLVM_SET_SUBTARGET_FEATURES(Features);
FeatureStr = Features.getString();
#endif
- TheTarget = TME->createTargetMachine(*TheModule, FeatureStr);
+ TheTarget = TME->CtorFn(*TheModule, FeatureStr);
assert(TheTarget->getTargetData()->isBigEndian() == BYTES_BIG_ENDIAN);
TheFolder = new TargetFolder(TheTarget->getTargetData(), getGlobalContext());
Modified: llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp?rev=75800&r1=75799&r2=75800&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-linker-hack.cpp Wed Jul 15 12:29:37 2009
@@ -34,8 +34,8 @@
#include "llvm/Support/MemoryBuffer.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Streams.h"
+#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Target/TargetMachine.h"
-#include "llvm/Target/TargetRegistry.h"
/// dummy_function - This is used when linking the LLVM libraries into a dynamic
/// library, allowing the llvm backend to be shared across the various
@@ -100,7 +100,8 @@
llvm::PrettyStackTraceProgram::PrettyStackTraceProgram(0, 0);
llvm::DIFactory::DIFactory(*MP->getModule());
std::string Err;
- llvm::TargetRegister::getClosestStaticTargetForModule(*MP->getModule(), Err);
+ llvm::TargetMachineRegistry::getClosestStaticTargetForModule(*MP->getModule(),
+ Err);
}
/* LLVM LOCAL end (ENTIRE FILE!) */
More information about the llvm-commits
mailing list