diff --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td --- a/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td +++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMAttrDefs.td @@ -379,7 +379,7 @@ "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 @@ 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 @@ "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); }]>