[llvm] r214782 - Reorder to keep data and routines separate and to keep a couple of

Eric Christopher echristo at gmail.com
Mon Aug 4 14:25:44 PDT 2014


Author: echristo
Date: Mon Aug  4 16:25:44 2014
New Revision: 214782

URL: http://llvm.org/viewvc/llvm-project?rev=214782&view=rev
Log:
Reorder to keep data and routines separate and to keep a couple of
similar routines close to each other.

Modified:
    llvm/trunk/include/llvm/Target/TargetMachine.h

Modified: llvm/trunk/include/llvm/Target/TargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Target/TargetMachine.h?rev=214782&r1=214781&r2=214782&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Target/TargetMachine.h (original)
+++ llvm/trunk/include/llvm/Target/TargetMachine.h Mon Aug  4 16:25:44 2014
@@ -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<TargetSubtargetInfo *>(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<typename STC> const STC &getSubtarget() const {
+    return *static_cast<const STC*>(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<typename STC> const STC &getSubtarget() const {
-    return *static_cast<const STC*>(getSubtargetImpl());
-  }
-
   /// getIntrinsicInfo - If intrinsic information is available, return it.  If
   /// not, return null.
   ///





More information about the llvm-commits mailing list