[llvm-commits] [llvm] r79024 - in /llvm/trunk/lib/Target/MSP430: AsmPrinter/MSP430AsmPrinter.cpp MSP430TargetMachine.cpp
Anton Korobeynikov
asl at math.spbu.ru
Fri Aug 14 12:06:50 PDT 2009
Author: asl
Date: Fri Aug 14 14:06:50 2009
New Revision: 79024
URL: http://llvm.org/viewvc/llvm-project?rev=79024&view=rev
Log:
Cleanup the mess in msp430 target registration and hopefully unbreak the build
Modified:
llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
Modified: llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp?rev=79024&r1=79023&r2=79024&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/AsmPrinter/MSP430AsmPrinter.cpp Fri Aug 14 14:06:50 2009
@@ -242,9 +242,7 @@
}
}
-extern "C" void LLVMInitializeMSP430Target() {
- // Register the target.
- RegisterTargetMachine<MSP430TargetMachine> X(TheMSP430Target);
- RegisterAsmPrinter<MSP430AsmPrinter> Y(TheMSP430Target);
- RegisterAsmInfo<MSP430TargetAsmInfo> Z(TheMSP430Target);
+// Force static initialization.
+extern "C" void LLVMInitializeMSP430AsmPrinter() {
+ RegisterAsmPrinter<MSP430AsmPrinter> X(TheMSP430Target);
}
Modified: llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp?rev=79024&r1=79023&r2=79024&view=diff
==============================================================================
--- llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/MSP430/MSP430TargetMachine.cpp Fri Aug 14 14:06:50 2009
@@ -17,8 +17,15 @@
#include "llvm/PassManager.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/Target/TargetAsmInfo.h"
+#include "llvm/Target/TargetRegistry.h"
using namespace llvm;
+extern "C" void LLVMInitializeMSP430Target() {
+ // Register the target.
+ RegisterTargetMachine<MSP430TargetMachine> X(TheMSP430Target);
+ RegisterAsmInfo<MSP430TargetAsmInfo> Z(TheMSP430Target);
+}
+
MSP430TargetMachine::MSP430TargetMachine(const Target &T,
const std::string &TT,
const std::string &FS) :
More information about the llvm-commits
mailing list