[llvm] 517f0f1 - MachineBasicBlock: Avoid copy in skipDebugInstructions{Forward,Backward}, NFC

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 23 10:23:55 PDT 2020


Author: Vedant Kumar
Date: 2020-04-23T10:22:28-07:00
New Revision: 517f0f14bfa8e1ef4caa4ed08c70c644b4116a8f

URL: https://github.com/llvm/llvm-project/commit/517f0f14bfa8e1ef4caa4ed08c70c644b4116a8f
DIFF: https://github.com/llvm/llvm-project/commit/517f0f14bfa8e1ef4caa4ed08c70c644b4116a8f.diff

LOG: MachineBasicBlock: Avoid copy in skipDebugInstructions{Forward,Backward}, NFC

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineBasicBlock.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineBasicBlock.h b/llvm/include/llvm/CodeGen/MachineBasicBlock.h
index de034e1fe498..d6c7d508b535 100644
--- a/llvm/include/llvm/CodeGen/MachineBasicBlock.h
+++ b/llvm/include/llvm/CodeGen/MachineBasicBlock.h
@@ -1046,7 +1046,7 @@ class MachineInstrSpan {
 template<typename IterT>
 inline IterT skipDebugInstructionsForward(IterT It, IterT End) {
   while (It != End && It->isDebugInstr())
-    It++;
+    ++It;
   return It;
 }
 
@@ -1057,7 +1057,7 @@ inline IterT skipDebugInstructionsForward(IterT It, IterT End) {
 template<class IterT>
 inline IterT skipDebugInstructionsBackward(IterT It, IterT Begin) {
   while (It != Begin && It->isDebugInstr())
-    It--;
+    --It;
   return It;
 }
 


        


More information about the llvm-commits mailing list