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 ef77b60..c00461e 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; }
-  void setSubtarget(TargetSubtargetInfo *ST) { STI = ST; }
+  void setSubtarget(const TargetSubtargetInfo *ST) { STI = ST; }
 
   /// getRegInfo - Return information about the registers currently in use.
   ///