Skip to content

Commit c25dd35

Browse files
committed
use translate instead of convert
1 parent 5ea8571 commit c25dd35

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

mlir/lib/Target/LLVMIR/Dialect/Ptr/PtrToLLVMIRTranslation.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,21 @@ translateConstantOp(ConstantOp constantOp, llvm::IRBuilderBase &builder,
351351
return success();
352352
}
353353

354-
/// Convert ptr.ptr_diff operation
354+
/// Translate ptr.ptr_diff operation operation to LLVM IR.
355355
static LogicalResult
356-
convertPtrDiffOp(PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder,
357-
LLVM::ModuleTranslation &moduleTranslation) {
356+
translatePtrDiffOp(PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder,
357+
LLVM::ModuleTranslation &moduleTranslation) {
358358
llvm::Value *lhs = moduleTranslation.lookupValue(ptrDiffOp.getLhs());
359359
llvm::Value *rhs = moduleTranslation.lookupValue(ptrDiffOp.getRhs());
360360

361361
if (!lhs || !rhs)
362362
return ptrDiffOp.emitError("Failed to lookup operands");
363363

364-
// Convert result type to LLVM type
364+
// Translate result type to LLVM type
365365
llvm::Type *resultType =
366366
moduleTranslation.convertType(ptrDiffOp.getResult().getType());
367367
if (!resultType)
368-
return ptrDiffOp.emitError("Failed to convert result type");
368+
return ptrDiffOp.emitError("Failed to translate result type");
369369

370370
PtrDiffFlags flags = ptrDiffOp.getFlags();
371371

@@ -408,7 +408,7 @@ class PtrDialectLLVMIRTranslationInterface
408408
return translatePtrAddOp(ptrAddOp, builder, moduleTranslation);
409409
})
410410
.Case([&](PtrDiffOp ptrDiffOp) {
411-
return convertPtrDiffOp(ptrDiffOp, builder, moduleTranslation);
411+
return translatePtrDiffOp(ptrDiffOp, builder, moduleTranslation);
412412
})
413413
.Case([&](LoadOp loadOp) {
414414
return translateLoadOp(loadOp, builder, moduleTranslation);

0 commit comments

Comments
 (0)