Have setSubtarget take a const subtarget.
authorEric Christopher <echristo@gmail.com>
Fri, 26 Sep 2014 01:28:13 +0000 (01:28 +0000)
committerEric Christopher <echristo@gmail.com>
Fri, 26 Sep 2014 01:28:13 +0000 (01:28 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218490 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineFunction.h

index ef77b6069fcc2db00d2a6f6e35ee0affa09fc491..c00461e901f7c6b22b757c5fc24497bf308cf4b5 100644 (file)
@@ -168,7 +168,7 @@ public:
   /// getSubtarget - Return the subtarget for which this machine code is being
   /// compiled.
   const TargetSubtargetInfo &getSubtarget() const { return *STI; }
   /// getSubtarget - Return the subtarget for which this machine code is being
   /// compiled.
   const TargetSubtargetInfo &getSubtarget() const { return *STI; }
-  void setSubtarget(TargetSubtargetInfo *ST) { STI = ST; }
+  void setSubtarget(const TargetSubtargetInfo *ST) { STI = ST; }
 
   /// getRegInfo - Return information about the registers currently in use.
   ///
 
   /// getRegInfo - Return information about the registers currently in use.
   ///