X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FCppBackend%2FCPPTargetMachine.h;h=287e53727139f5d935ea896a7416885b46e683e2;hb=772fe17a6d07304ae2e6b3052bbb24ebb751f0f3;hp=558a9a1aeefe4f1dd723a208671e1f65e931bec3;hpb=03f4bc5d6cf777c8aa559c299ef7f85126872881;p=oota-llvm.git diff --git a/lib/Target/CppBackend/CPPTargetMachine.h b/lib/Target/CppBackend/CPPTargetMachine.h index 558a9a1aeef..287e5372713 100644 --- a/lib/Target/CppBackend/CPPTargetMachine.h +++ b/lib/Target/CppBackend/CPPTargetMachine.h @@ -22,23 +22,22 @@ namespace llvm { class formatted_raw_ostream; struct CPPTargetMachine : public TargetMachine { - const TargetData DataLayout; // Calculates type size & alignment - - CPPTargetMachine(const Target &T, const Module &M, const std::string &FS) - : TargetMachine(T), DataLayout(&M) {} - - virtual bool WantsWholeFile() const { return true; } - virtual bool addPassesToEmitWholeFile(PassManager &PM, - formatted_raw_ostream &Out, - CodeGenFileType FileType, - CodeGenOpt::Level OptLevel); - - // This class always works, but shouldn't be the default in most cases. - static unsigned getModuleMatchQuality(const Module &M) { return 1; } - - virtual const TargetData *getTargetData() const { return &DataLayout; } + CPPTargetMachine(const Target &T, StringRef TT, + StringRef CPU, StringRef FS, + Reloc::Model RM, CodeModel::Model CM) + : TargetMachine(T, TT, CPU, FS) {} + + virtual bool addPassesToEmitFile(PassManagerBase &PM, + formatted_raw_ostream &Out, + CodeGenFileType FileType, + CodeGenOpt::Level OptLevel, + bool DisableVerify); + + virtual const TargetData *getTargetData() const { return 0; } }; +extern Target TheCppBackendTarget; + } // End llvm namespace