@@ -351,21 +351,21 @@ translateConstantOp(ConstantOp constantOp, llvm::IRBuilderBase &builder,
351
351
return success ();
352
352
}
353
353
354
- // / Convert ptr.ptr_diff operation
354
+ // / Translate ptr.ptr_diff operation operation to LLVM IR.
355
355
static LogicalResult
356
- convertPtrDiffOp (PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder,
357
- LLVM::ModuleTranslation &moduleTranslation) {
356
+ translatePtrDiffOp (PtrDiffOp ptrDiffOp, llvm::IRBuilderBase &builder,
357
+ LLVM::ModuleTranslation &moduleTranslation) {
358
358
llvm::Value *lhs = moduleTranslation.lookupValue (ptrDiffOp.getLhs ());
359
359
llvm::Value *rhs = moduleTranslation.lookupValue (ptrDiffOp.getRhs ());
360
360
361
361
if (!lhs || !rhs)
362
362
return ptrDiffOp.emitError (" Failed to lookup operands" );
363
363
364
- // Convert result type to LLVM type
364
+ // Translate result type to LLVM type
365
365
llvm::Type *resultType =
366
366
moduleTranslation.convertType (ptrDiffOp.getResult ().getType ());
367
367
if (!resultType)
368
- return ptrDiffOp.emitError (" Failed to convert result type" );
368
+ return ptrDiffOp.emitError (" Failed to translate result type" );
369
369
370
370
PtrDiffFlags flags = ptrDiffOp.getFlags ();
371
371
@@ -408,7 +408,7 @@ class PtrDialectLLVMIRTranslationInterface
408
408
return translatePtrAddOp (ptrAddOp, builder, moduleTranslation);
409
409
})
410
410
.Case ([&](PtrDiffOp ptrDiffOp) {
411
- return convertPtrDiffOp (ptrDiffOp, builder, moduleTranslation);
411
+ return translatePtrDiffOp (ptrDiffOp, builder, moduleTranslation);
412
412
})
413
413
.Case ([&](LoadOp loadOp) {
414
414
return translateLoadOp (loadOp, builder, moduleTranslation);
0 commit comments