[Mlir-commits] [mlir] ddd1d1c - [mlir][llvm] Builders dont access null attr (NFC)
Christian Ulmann
llvmlistbot at llvm.org
Mon Feb 27 00:48:27 PST 2023
Author: Christian Ulmann
Date: 2023-02-27T09:46:08+01:00
New Revision: ddd1d1c5657989b75bdf4b1ae7c64366a34fbb35
URL: https://github.com/llvm/llvm-project/commit/ddd1d1c5657989b75bdf4b1ae7c64366a34fbb35
DIFF: https://github.com/llvm/llvm-project/commit/ddd1d1c5657989b75bdf4b1ae7c64366a34fbb35.diff
LOG: [mlir][llvm] Builders dont access null attr (NFC)
Reviewed By: gysit
Differential Revision: https://reviews.llvm.org/D144267
Added:
Modified:
mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
Removed:
################################################################################
diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
index 06755f3f3204e..b90782bea4200 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td
@@ -379,7 +379,7 @@ def LLVM_DILexicalBlockAttr : LLVM_Attr<"DILexicalBlock", "di_lexical_block",
"DIScopeAttr":$scope, "DIFileAttr":$file, "unsigned":$line,
"unsigned":$column
), [{
- return $_get(file.getContext(), scope, file, line, column);
+ return $_get(scope.getContext(), scope, file, line, column);
}]>
];
let assemblyFormat = "`<` struct(params) `>`";
@@ -400,7 +400,7 @@ def LLVM_DILexicalBlockFile : LLVM_Attr<"DILexicalBlockFile", "di_lexical_block_
AttrBuilderWithInferredContext<(ins
"DIScopeAttr":$scope, "DIFileAttr":$file, "unsigned":$discriminator
), [{
- return $_get(file.getContext(), scope, file, discriminator);
+ return $_get(scope.getContext(), scope, file, discriminator);
}]>
];
let assemblyFormat = "`<` struct(params) `>`";
@@ -427,7 +427,7 @@ def LLVM_DILocalVariableAttr : LLVM_Attr<"DILocalVariable", "di_local_variable",
"unsigned":$line, "unsigned":$arg, "unsigned":$alignInBits,
"DITypeAttr":$type
), [{
- MLIRContext *ctx = file.getContext();
+ MLIRContext *ctx = scope.getContext();
return $_get(ctx, scope, StringAttr::get(ctx, name), file, line,
arg, alignInBits, type);
}]>
More information about the Mlir-commits
mailing list