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

whitequark via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 6 08:48:34 PST 2017


whitequark requested changes to this revision.
whitequark added inline comments.
This revision now requires changes to proceed.


================
Comment at: include/llvm-c/Core.h:2832
 LLVMBuilderRef LLVMCreateBuilder(void);
+/** Deprecated: Use LLVMPositionBuilderWithLoc instead. */
 void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block,
----------------
Why should we deprecate these at all? It's legal to pass Loc = NULL for no location, right? Then why shouldn't we make e.g. `LLVMPositionBuilderBefore(...)` an alias to `LLVMPositionBuilderBeforeWithLoc(..., NULL)` and keep existing code working? Very few frontends in the wild bother with any debug information at all, I don't think it makes sense to break all of them.


https://reviews.llvm.org/D39982





More information about the llvm-commits mailing list