[llvm-commits] [llvm] r68161 - in /llvm/branches/Apple/Dib: include/llvm/CodeGen/MachineBasicBlock.h lib/CodeGen/MachineBasicBlock.cpp

Bill Wendling isanbard at gmail.com
Tue Mar 31 16:58:23 PDT 2009


Author: void
Date: Tue Mar 31 18:58:23 2009
New Revision: 68161

URL: http://llvm.org/viewvc/llvm-project?rev=68161&view=rev
Log:
--- Merging (from foreign repository) r68054 into '.':
U    include/llvm/CodeGen/MachineBasicBlock.h
U    lib/CodeGen/MachineBasicBlock.cpp

Constify arguments in isSuccessor and isLayoutSuccessor.

Modified:
    llvm/branches/Apple/Dib/include/llvm/CodeGen/MachineBasicBlock.h
    llvm/branches/Apple/Dib/lib/CodeGen/MachineBasicBlock.cpp

Modified: llvm/branches/Apple/Dib/include/llvm/CodeGen/MachineBasicBlock.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/include/llvm/CodeGen/MachineBasicBlock.h?rev=68161&r1=68160&r2=68161&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/include/llvm/CodeGen/MachineBasicBlock.h (original)
+++ llvm/branches/Apple/Dib/include/llvm/CodeGen/MachineBasicBlock.h Tue Mar 31 18:58:23 2009
@@ -239,14 +239,14 @@
   
   /// isSuccessor - Return true if the specified MBB is a successor of this
   /// block.
-  bool isSuccessor(MachineBasicBlock *MBB) const;
+  bool isSuccessor(const MachineBasicBlock *MBB) const;
 
   /// isLayoutSuccessor - Return true if the specified MBB will be emitted
   /// immediately after this block, such that if this block exits by
   /// falling through, control will transfer to the specified MBB. Note
   /// that MBB need not be a successor at all, for example if this block
   /// ends with an unconditional branch to some other block.
-  bool isLayoutSuccessor(MachineBasicBlock *MBB) const;
+  bool isLayoutSuccessor(const MachineBasicBlock *MBB) const;
 
   /// getFirstTerminator - returns an iterator to the first terminator
   /// instruction of this basic block. If a terminator does not exist,

Modified: llvm/branches/Apple/Dib/lib/CodeGen/MachineBasicBlock.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Dib/lib/CodeGen/MachineBasicBlock.cpp?rev=68161&r1=68160&r2=68161&view=diff

==============================================================================
--- llvm/branches/Apple/Dib/lib/CodeGen/MachineBasicBlock.cpp (original)
+++ llvm/branches/Apple/Dib/lib/CodeGen/MachineBasicBlock.cpp Tue Mar 31 18:58:23 2009
@@ -258,13 +258,13 @@
     fromMBB->removeSuccessor(fromMBB->succ_begin());
 }
 
-bool MachineBasicBlock::isSuccessor(MachineBasicBlock *MBB) const {
+bool MachineBasicBlock::isSuccessor(const MachineBasicBlock *MBB) const {
   std::vector<MachineBasicBlock *>::const_iterator I =
     std::find(Successors.begin(), Successors.end(), MBB);
   return I != Successors.end();
 }
 
-bool MachineBasicBlock::isLayoutSuccessor(MachineBasicBlock *MBB) const {
+bool MachineBasicBlock::isLayoutSuccessor(const MachineBasicBlock *MBB) const {
   MachineFunction::const_iterator I(this);
   return next(I) == MachineFunction::const_iterator(MBB);
 }





More information about the llvm-commits mailing list