[llvm-commits] CVS: llvm/lib/Target/CBackend/CTargetMachine.h Writer.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sat Jul 10 21:50:00 PDT 2004
Changes in directory llvm/lib/Target/CBackend:
CTargetMachine.h updated: 1.4 -> 1.5
Writer.cpp updated: 1.184 -> 1.185
---
Log message:
Auto-registrate target
---
Diffs of the changes: (+7 -0)
Index: llvm/lib/Target/CBackend/CTargetMachine.h
diff -u llvm/lib/Target/CBackend/CTargetMachine.h:1.4 llvm/lib/Target/CBackend/CTargetMachine.h:1.5
--- llvm/lib/Target/CBackend/CTargetMachine.h:1.4 Wed Jun 2 00:53:52 2004
+++ llvm/lib/Target/CBackend/CTargetMachine.h Sat Jul 10 21:48:49 2004
@@ -25,6 +25,9 @@
// This is the only thing that actually does anything here.
virtual bool addPassesToEmitAssembly(PassManager &PM, std::ostream &Out);
+
+ // This class always works, but shouldn't be the default in most cases.
+ static unsigned getModuleMatchQuality(const Module &M) { return 1; }
};
} // End llvm namespace
Index: llvm/lib/Target/CBackend/Writer.cpp
diff -u llvm/lib/Target/CBackend/Writer.cpp:1.184 llvm/lib/Target/CBackend/Writer.cpp:1.185
--- llvm/lib/Target/CBackend/Writer.cpp:1.184 Sun Jul 4 07:19:56 2004
+++ llvm/lib/Target/CBackend/Writer.cpp Sat Jul 10 21:48:49 2004
@@ -27,6 +27,7 @@
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/CodeGen/IntrinsicLowering.h"
#include "llvm/Transforms/Scalar.h"
+#include "llvm/Target/TargetMachineRegistry.h"
#include "llvm/Support/CallSite.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/GetElementPtrTypeIterator.h"
@@ -40,6 +41,9 @@
using namespace llvm;
namespace {
+ // Register the target.
+ RegisterTarget<CTargetMachine> X("c", "C backend");
+
/// NameAllUsedStructs - This pass inserts names for any unnamed structure
/// types that are used by the program.
///
More information about the llvm-commits
mailing list