From 315a466aed9bcc896007098719ed9e0a35a3459d Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 28 Dec 2018 13:07:39 -0800 Subject: Rename BasicBlock and StmtBlock to Block, and make a pass cleaning it up. I did not make an effort to rename all of the 'bb' names in the codebase, since they are still correct and any specific missed once can be fixed up on demand. The last major renaming is Statement -> Instruction, which is why Statement and Stmt still appears in various places. This is step 19/n towards merging instructions and statements, NFC. PiperOrigin-RevId: 227163082 --- mlir/lib/IR/Operation.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'mlir/lib/IR/Operation.cpp') diff --git a/mlir/lib/IR/Operation.cpp b/mlir/lib/IR/Operation.cpp index 23e54b3638e..ccd7d65f7c8 100644 --- a/mlir/lib/IR/Operation.cpp +++ b/mlir/lib/IR/Operation.cpp @@ -245,7 +245,7 @@ bool OpTrait::impl::verifySameOperandsAndResultType(const OperationInst *op) { static bool verifyBBArguments( llvm::iterator_range operands, - const BasicBlock *destBB, const OperationInst *op) { + const Block *destBB, const OperationInst *op) { unsigned operandCount = std::distance(operands.begin(), operands.end()); if (operandCount != destBB->getNumArguments()) return op->emitError("branch has " + Twine(operandCount) + @@ -277,11 +277,11 @@ static bool verifyTerminatorSuccessors(const OperationInst *op) { bool OpTrait::impl::verifyIsTerminator(const OperationInst *op) { // Verify that the operation is at the end of the respective parent block. if (op->getFunction()->isML()) { - StmtBlock *block = op->getBlock(); - if (!block || block->getContainingStmt() || &block->back() != op) + Block *block = op->getBlock(); + if (!block || block->getContainingInst() || &block->back() != op) return op->emitOpError("must be the last statement in the ML function"); } else { - const BasicBlock *block = op->getBlock(); + const Block *block = op->getBlock(); if (!block || &block->back() != op) return op->emitOpError( "must be the last instruction in the parent basic block."); -- cgit v1.2.3