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

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 14 11:22:01 PST 2017


davide added inline comments.


================
Comment at: include/llvm/IR/IRBuilder.h:130
+  /// \deprecated{Please use:
+  ///   setInsertPoint(BasicBlock *, DebugLoc)
+  /// }
----------------
I'd really love to hear Eric (@echristo) input on this, but I have mixed feelings about deprecating an API and introducing a new API with the same name (and just a different overload).
It seems like people might still use this wrong, should we choose a different name?


================
Comment at: lib/IR/Core.cpp:2393
 
+void LLVMPositionBuilder2(LLVMBuilderRef Builder, LLVMBasicBlockRef Block,
+                          LLVMValueRef Instr, LLVMValueRef Loc) {
----------------
The *2 variants are probably OK, and other projects seem to use it successfully.
http://man7.org/linux/man-pages/man2/rename.2.html
Not sure if we have a precedent, but it doesn't seem a bad path forward.


https://reviews.llvm.org/D39982





More information about the llvm-commits mailing list