[PATCH] D39982: [IRBuilder] Set the insert point and debug location together

Adrian Prantl via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 13 19:06:07 PST 2017


aprantl added inline comments.


================
Comment at: include/llvm/IR/IRBuilder.h:138
+  /// of the specified block, and should have the given debug location.
+  void setInsertPoint(BasicBlock *TheBB, const DebugLoc &Loc) {
+    BB = TheBB;
----------------
DebugLoc is already a value type, so we shouldn't pass it by reference.


================
Comment at: include/llvm/IR/IRBuilder.h:147
+  ///
+  /// Note: This method is deprecated. Please use:
+  ///   setInsertPoint(Instruction *, const DebugLoc &)
----------------
out of curiosity: is there a doxygen command such as `\deprecated`?


================
Comment at: include/llvm/IR/IRBuilder.h:167
+  ///
+  /// Note: This method is deprecated. Please use either:
+  ///   setInsertPoint(BasicBlock *, BasicBlock::iterator, const DebugLoc &)
----------------
either?


================
Comment at: include/llvm/IR/IRBuilder.h:189
+  /// attached to it. Otherwise, this returns a <file>:0:0 location with the
+  /// DIScope set to the current inline scope.
+  DebugLoc getUnknownDebugLocation(Instruction *InsertPt = nullptr) const;
----------------
`@{`


================
Comment at: include/llvm/IR/IRBuilder.h:193
+                                   BasicBlock::iterator IP) const;
+
   /// \brief Set location information used by debugging information.
----------------
`@}`


https://reviews.llvm.org/D39982





More information about the llvm-commits mailing list