summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/Mips/MipsTargetMachine.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-06-16 22:38:04 +0000
committerChris Lattner <sabre@nondot.org>2009-06-16 22:38:04 +0000
commitca52e86346f2baa764320f61c3936934628dba6e (patch)
treef9860ad402d39b515355935fb55eafc8df8c26b0 /llvm/lib/Target/Mips/MipsTargetMachine.cpp
parent4533a556968ebaee245376488e4839a5dc647ce4 (diff)
downloadbcm5719-llvm-ca52e86346f2baa764320f61c3936934628dba6e.tar.gz
bcm5719-llvm-ca52e86346f2baa764320f61c3936934628dba6e.zip
fix a circular dependency between the mips code generator
and its asmprinter. llvm-svn: 73573
Diffstat (limited to 'llvm/lib/Target/Mips/MipsTargetMachine.cpp')
-rw-r--r--llvm/lib/Target/Mips/MipsTargetMachine.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/Target/Mips/MipsTargetMachine.cpp b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
index 720e9a85b5d..83b9b62e8ee 100644
--- a/llvm/lib/Target/Mips/MipsTargetMachine.cpp
+++ b/llvm/lib/Target/Mips/MipsTargetMachine.cpp
@@ -31,6 +31,9 @@ int MipsTargetMachineModule = 0;
static RegisterTarget<MipsTargetMachine> X("mips", "Mips");
static RegisterTarget<MipselTargetMachine> Y("mipsel", "Mipsel");
+MipsTargetMachine::AsmPrinterCtorFn MipsTargetMachine::AsmPrinterCtor = 0;
+
+
// Force static initialization when called from llvm/InitializeAllTargets.h
namespace llvm {
void InitializeMipsTarget() { }
@@ -130,9 +133,9 @@ addPreEmitPass(PassManagerBase &PM, CodeGenOpt::Level OptLevel)
// true if AssemblyEmitter is supported
bool MipsTargetMachine::
addAssemblyEmitter(PassManagerBase &PM, CodeGenOpt::Level OptLevel,
- bool Verbose, raw_ostream &Out)
-{
+ bool Verbose, raw_ostream &Out) {
// Output assembly language.
- PM.add(createMipsCodePrinterPass(Out, *this, OptLevel, Verbose));
+ assert(AsmPrinterCtor && "AsmPrinter was not linked in");
+ PM.add(AsmPrinterCtor(Out, *this, OptLevel, Verbose));
return false;
}
OpenPOWER on IntegriCloud