From 5b08f1626b054bece275dc298520579336a77080 Mon Sep 17 00:00:00 2001 From: Eric Christopher Date: Mon, 4 Aug 2014 21:25:44 +0000 Subject: [PATCH] Reorder to keep data and routines separate and to keep a couple of similar routines close to each other. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214782 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Target/TargetMachine.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/include/llvm/Target/TargetMachine.h b/include/llvm/Target/TargetMachine.h index d3f3e58da7e..dcd454e8949 100644 --- a/include/llvm/Target/TargetMachine.h +++ b/include/llvm/Target/TargetMachine.h @@ -86,6 +86,8 @@ protected: // Can only create subclasses. unsigned RequireStructuredCFG : 1; public: + mutable TargetOptions Options; + virtual ~TargetMachine(); const Target &getTarget() const { return TheTarget; } @@ -104,7 +106,12 @@ public: return const_cast(TM->getSubtargetImpl()); } - mutable TargetOptions Options; + /// getSubtarget - This method returns a pointer to the specified type of + /// TargetSubtargetInfo. In debug builds, it verifies that the object being + /// returned is of the correct type. + template const STC &getSubtarget() const { + return *static_cast(getSubtargetImpl()); + } /// \brief Reset the target options based on the function's attributes. void resetTargetOptions(const MachineFunction *MF) const; @@ -113,13 +120,6 @@ public: /// const MCAsmInfo *getMCAsmInfo() const { return AsmInfo; } - /// getSubtarget - This method returns a pointer to the specified type of - /// TargetSubtargetInfo. In debug builds, it verifies that the object being - /// returned is of the correct type. - template const STC &getSubtarget() const { - return *static_cast(getSubtargetImpl()); - } - /// getIntrinsicInfo - If intrinsic information is available, return it. If /// not, return null. ///