[llvm] r185883 - Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.

Nadav Rotem nrotem at apple.com
Mon Jul 8 16:27:44 PDT 2013


Author: nadav
Date: Mon Jul  8 18:27:43 2013
New Revision: 185883

URL: http://llvm.org/viewvc/llvm-project?rev=185883&view=rev
Log:
Fix a bug in IRBuilder::ClearInsertionPoint. The IR Builder needs to reset both the BB and the insert point inside the BB.

Modified:
    llvm/trunk/include/llvm/IR/IRBuilder.h

Modified: llvm/trunk/include/llvm/IR/IRBuilder.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/IR/IRBuilder.h?rev=185883&r1=185882&r2=185883&view=diff
==============================================================================
--- llvm/trunk/include/llvm/IR/IRBuilder.h (original)
+++ llvm/trunk/include/llvm/IR/IRBuilder.h Mon Jul  8 18:27:43 2013
@@ -71,6 +71,7 @@ public:
   /// inserted into a block.
   void ClearInsertionPoint() {
     BB = 0;
+    InsertPt = 0;
   }
 
   BasicBlock *GetInsertBlock() const { return BB; }





More information about the llvm-commits mailing list