Make a few more things const.
authorBill Wendling <isanbard@gmail.com>
Thu, 15 Aug 2013 20:25:44 +0000 (20:25 +0000)
committerBill Wendling <isanbard@gmail.com>
Thu, 15 Aug 2013 20:25:44 +0000 (20:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@188484 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineModuleInfo.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp

index 186017c9063e71c96f4727da8ddaa717f661572a..460c08c8ca7ee6d630d9c1114f789af334012e11 100644 (file)
@@ -234,7 +234,7 @@ public:
   /// \brief Returns a reference to a list of cfi instructions in the current
   /// function's prologue.  Used to construct frame maps for debug and exception
   /// handling comsumers.
-  const std::vector<MCCFIInstruction> &getFrameInstructions() {
+  const std::vector<MCCFIInstruction> &getFrameInstructions() const {
     return FrameInstructions;
   }
 
index 4d9497a96bdeb2cf8896e32c613af5dfacacdac2..42a21650fb347ffbe599b48d4bb42ac8ec2ee578 100644 (file)
@@ -646,7 +646,7 @@ bool AsmPrinter::needsRelocationsForDwarfStringPool() const {
 }
 
 void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
-  MCSymbol *Label = MI.getOperand(0).getMCSymbol();
+  const MCSymbol *Label = MI.getOperand(0).getMCSymbol();
 
   if (MAI->getExceptionHandlingType() != ExceptionHandling::DwarfCFI)
     return;
@@ -657,7 +657,7 @@ void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
   if (MMI->getCompactUnwindEncoding() != 0)
     OutStreamer.EmitCompactUnwindEncoding(MMI->getCompactUnwindEncoding());
 
-  MachineModuleInfo &MMI = MF->getMMI();
+  const MachineModuleInfo &MMI = MF->getMMI();
   const std::vector<MCCFIInstruction> &Instrs = MMI.getFrameInstructions();
   bool FoundOne = false;
   (void)FoundOne;