================
@@ -200,11 +200,12 @@ class IRBuilderBase {
   }
 
   /// This specifies that created instructions should be inserted at
-  /// the specified point, but also requires that \p IP is dereferencable.
+  /// the specified point.
   void SetInsertPoint(BasicBlock::iterator IP) {
-    BB = IP->getParent();
+    BB = IP.getNodeParent();
     InsertPt = IP;
-    SetCurrentDebugLocation(IP->getStableDebugLoc());
+    if (IP != BB->end())
+      SetCurrentDebugLocation(IP->getStableDebugLoc());
----------------
nikic wrote:

Hm, I agree that this would make sense, but it's not done by the method above 
it, which is supposed to have the same behavior. Should probably change these 
together in a followup?

https://github.com/llvm/llvm-project/pull/228117
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to