From 564bcf9d0243ef4f3f5ed848f7195fd0489c77a5 Mon Sep 17 00:00:00 2001 From: Mehdi Amini Date: Wed, 5 Jan 2022 05:36:34 +0000 Subject: Align adaptor's generator accessors for attribute on the Op class Each attribute has two accessor: one suffixed with `Attr` which returns the attribute itself and one without the suffix which unwrap the attribute. For example for a StringAttr attribute with a field named `kind`, we'll generate: StringAttr getKindAttr(); StringRef getKind(); Differential Revision: https://reviews.llvm.org/D116466 --- mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp') diff --git a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp index 828f0ef..0d3157d 100644 --- a/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp +++ b/mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp @@ -209,7 +209,7 @@ LogicalResult GPUPrintfOpToHIPLowering::matchAndRewrite( (formatStringPrefix + Twine(stringNumber++)).toStringRef(stringConstName); } while (moduleOp.lookupSymbol(stringConstName)); - llvm::SmallString<20> formatString(adaptor.format().getValue()); + llvm::SmallString<20> formatString(adaptor.format()); formatString.push_back('\0'); // Null terminate for C size_t formatStringSize = formatString.size_in_bytes(); @@ -309,7 +309,7 @@ LogicalResult GPUPrintfOpToLLVMCallLowering::matchAndRewrite( (formatStringPrefix + Twine(stringNumber++)).toStringRef(stringConstName); } while (moduleOp.lookupSymbol(stringConstName)); - llvm::SmallString<20> formatString(adaptor.format().getValue()); + llvm::SmallString<20> formatString(adaptor.format()); formatString.push_back('\0'); // Null terminate for C auto globalType = LLVM::LLVMArrayType::get(llvmI8, formatString.size_in_bytes()); -- cgit v1.1