diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2022-01-05 05:36:34 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2022-01-05 05:42:15 +0000 |
commit | 564bcf9d0243ef4f3f5ed848f7195fd0489c77a5 (patch) | |
tree | 1734128bd8453bcf38d7ce408e90bc3d153a0063 /mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp | |
parent | b5149f4e66a49a98b67e8e2de4e24a4af8e2781b (diff) | |
download | llvm-564bcf9d0243ef4f3f5ed848f7195fd0489c77a5.zip llvm-564bcf9d0243ef4f3f5ed848f7195fd0489c77a5.tar.gz llvm-564bcf9d0243ef4f3f5ed848f7195fd0489c77a5.tar.bz2 |
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
Diffstat (limited to 'mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp')
-rw-r--r-- | mlir/lib/Conversion/GPUCommon/GPUOpsLowering.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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()); |