X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=include%2Fllvm%2FTarget%2FTargetMachine.h;h=2d69493a0dd2c6673cfd338186337dacf132cf33;hb=04bcc11905d2f07de49807556fa42923dbb64b03;hp=f000abceda3b90be7fdc4361605d296a0e02de3f;hpb=d5dd8ce2a5336df4e4b4cc04d23e4018d93944f9;p=oota-llvm.git diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index f000abceda3..2d69493a0dd 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -44,6 +44,7 @@ class ScalarTargetTransformInfo; class VectorTargetTransformInfo; class formatted_raw_ostream; class raw_ostream; +class TargetLoweringObjectFile; // The old pass manager infrastructure is hidden in a legacy namespace now. namespace legacy { @@ -99,6 +100,12 @@ public: virtual const TargetSubtargetInfo *getSubtargetImpl() const { return nullptr; } + virtual const TargetSubtargetInfo *getSubtargetImpl(const Function &) const { + return getSubtargetImpl(); + } + virtual TargetLoweringObjectFile *getObjFileLowering() const { + return nullptr; + } /// getSubtarget - This method returns a pointer to the specified type of /// TargetSubtargetInfo. In debug builds, it verifies that the object being @@ -106,9 +113,20 @@ public: template const STC &getSubtarget() const { return *static_cast(getSubtargetImpl()); } + template const STC &getSubtarget(const Function *) const { + return *static_cast(getSubtargetImpl()); + } + + /// getDataLayout - This method returns a pointer to the DataLayout for + /// the target. It should be unchanging for every subtarget. + virtual const DataLayout *getDataLayout() const { + return nullptr; + } /// \brief Reset the target options based on the function's attributes. - void resetTargetOptions(const MachineFunction *MF) const; + // FIXME: Remove TargetOptions that affect per-function code generation + // from TargetMachine. + void resetTargetOptions(const Function &F) const; /// getMCAsmInfo - Return target specific asm information. ///