================
@@ -33,21 +219,33 @@ class PtrDialectLLVMIRTranslationInterface
LogicalResult
convertOperation(Operation *op, llvm::IRBuilderBase &builder,
LLVM::ModuleTranslation &moduleTranslation) const final {
- // Translation for ptr dialect operations to LLVM IR is currently
- // unimplemented.
- return op->emitError("Translation for ptr dialect operations to LLVM IR is
"
- "not implemented.");
+
+ return llvm::TypeSwitch<Operation *, LogicalResult>(op)
+ .Case<PtrAddOp>([&](PtrAddOp ptrAddOp) {
----------------
Dinistro wrote:
```suggestion
.Case([&](PtrAddOp ptrAddOp) {
```
Nit: The template parameter cab automatically be inferred from the lambda.
https://github.com/llvm/llvm-project/pull/156355
_______________________________________________
llvm-branch-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits