Author: Benjamin Kramer Date: 2021-01-25T11:48:58+01:00 New Revision: 6367306a1be3adf7125c0b8b8f87209b8fc836f7
URL: https://github.com/llvm/llvm-project/commit/6367306a1be3adf7125c0b8b8f87209b8fc836f7 DIFF: https://github.com/llvm/llvm-project/commit/6367306a1be3adf7125c0b8b8f87209b8fc836f7.diff LOG: [mlir] Perfectly forward ImplicitLocOpBuilder ctors to OpBuilder This is both cleaner and less prone to creating a mess out of overload resolution. Added: Modified: mlir/include/mlir/IR/ImplicitLocOpBuilder.h Removed: ################################################################################ diff --git a/mlir/include/mlir/IR/ImplicitLocOpBuilder.h b/mlir/include/mlir/IR/ImplicitLocOpBuilder.h index ff85f2b5a382..862be32e6208 100644 --- a/mlir/include/mlir/IR/ImplicitLocOpBuilder.h +++ b/mlir/include/mlir/IR/ImplicitLocOpBuilder.h @@ -22,20 +22,11 @@ namespace mlir { /// as OpBuilder. class ImplicitLocOpBuilder : public mlir::OpBuilder { public: - /// Create an ImplicitLocOpBuilder using the insertion point and listener from - /// an existing OpBuilder. - ImplicitLocOpBuilder(Location loc, const OpBuilder &builder) - : OpBuilder(builder), curLoc(loc) {} - /// OpBuilder has a bunch of convenience constructors - we support them all /// with the additional Location. - template <typename T> - ImplicitLocOpBuilder(Location loc, T &&operand, Listener *listener = nullptr) - : OpBuilder(std::forward<T>(operand), listener), curLoc(loc) {} - - ImplicitLocOpBuilder(Location loc, Block *block, Block::iterator insertPoint, - Listener *listener = nullptr) - : OpBuilder(block, insertPoint, listener), curLoc(loc) {} + template <typename... T> + ImplicitLocOpBuilder(Location loc, T &&...operands) + : OpBuilder(std::forward<T>(operands)...), curLoc(loc) {} /// Create a builder and set the insertion point to before the first operation /// in the block but still inside the block. _______________________________________________ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits