forked from OSchip/llvm-project
[mlir] Correct 2 places that result in corrupted conversion rollbacks
This corrects the last 2 issues caught by tests when causing dialect conversion rollbacks to occur. Differential Revision: https://reviews.llvm.org/D94623
This commit is contained in:
parent
33a8466531
commit
3bd620d450
|
@ -2144,7 +2144,7 @@ Value mlir::LLVM::createGlobalString(Location loc, OpBuilder &builder,
|
|||
assert(module && "builder points to an op outside of a module");
|
||||
|
||||
// Create the global at the entry of the module.
|
||||
OpBuilder moduleBuilder(module.getBodyRegion());
|
||||
OpBuilder moduleBuilder(module.getBodyRegion(), builder.getListener());
|
||||
MLIRContext *ctx = builder.getContext();
|
||||
auto type = LLVM::LLVMArrayType::get(IntegerType::get(ctx, 8), value.size());
|
||||
auto global = moduleBuilder.create<LLVM::GlobalOp>(
|
||||
|
|
|
@ -849,6 +849,7 @@ static void detachNestedAndErase(Operation *op) {
|
|||
block.dropAllDefinedValueUses();
|
||||
}
|
||||
}
|
||||
op->dropAllUses();
|
||||
op->erase();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue