[MachineIRBuilder] Expose the insertion point in the public API.
authorQuentin Colombet <qcolombet@apple.com>
Tue, 12 Apr 2016 00:07:14 +0000 (00:07 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 12 Apr 2016 00:07:14 +0000 (00:07 +0000)
It may be convenient to know where we are about to insert some code, for
instance to save and then restore this insertion.

llvm-svn: 266024

llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h

index 3603259..efdc59a 100644 (file)
@@ -50,9 +50,6 @@ class MachineIRBuilder {
     return *TII;
   }
 
-  /// Current insertion point for new instructions.
-  MachineBasicBlock::iterator getInsertPt();
-
 public:
   /// Getter for the function we currently build.
   MachineFunction &getMF() {
@@ -66,6 +63,9 @@ public:
     return *MBB;
   }
 
+  /// Current insertion point for new instructions.
+  MachineBasicBlock::iterator getInsertPt();
+
   /// Setters for the insertion point.
   /// @{
   /// Set the MachineFunction where to build instructions.