#include "llvm/Target/TargetMachineRegistry.h"
using namespace llvm;
+/// SparcTargetMachineModule - Note that this is used on hosts that
+/// cannot link in a library unless there are references into the
+/// library. In particular, it seems that it is not possible to get
+/// things to work on Win32 without this. Though it is unused, do not
+/// remove it.
+extern "C" int SparcTargetMachineModule;
+int SparcTargetMachineModule = 0;
+
// Register the target.
-static RegisterTarget<SparcTargetMachine> X("sparc", " SPARC");
+static RegisterTarget<SparcTargetMachine> X("sparc", "SPARC");
const TargetAsmInfo *SparcTargetMachine::createTargetAsmInfo() const {
// FIXME: Handle Solaris subtarget someday :)
///
SparcTargetMachine::SparcTargetMachine(const Module &M, const std::string &FS)
: DataLayout("E-p:32:32-f128:128:128"),
- Subtarget(M, FS), InstrInfo(Subtarget),
+ Subtarget(M, FS), TLInfo(*this), InstrInfo(Subtarget),
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 0) {
}
}
bool SparcTargetMachine::addAssemblyEmitter(PassManagerBase &PM, bool Fast,
- std::ostream &Out) {
+ raw_ostream &Out) {
// Output assembly language.
PM.add(createSparcCodePrinterPass(Out, *this));
return false;