forked from OSchip/llvm-project
[mlir] fix region property generation in python bindings
This commit is contained in:
parent
6b6564fcf9
commit
310736e098
|
@ -405,11 +405,11 @@ def VariadicAndNormalRegionOp : TestOp<"variadic_and_normal_region"> {
|
|||
let regions = (region AnyRegion:$region, AnyRegion, VariadicRegion<AnyRegion>:$variadic);
|
||||
|
||||
// CHECK: @builtins.property
|
||||
// CHECK: def region():
|
||||
// CHECK: def region(self):
|
||||
// CHECK: return self.regions[0]
|
||||
|
||||
// CHECK: @builtins.property
|
||||
// CHECK: def variadic():
|
||||
// CHECK: def variadic(self):
|
||||
// CHECK: return self.regions[2:]
|
||||
}
|
||||
|
||||
|
@ -429,7 +429,7 @@ def VariadicRegionOp : TestOp<"variadic_region"> {
|
|||
let regions = (region VariadicRegion<AnyRegion>:$Variadic);
|
||||
|
||||
// CHECK: @builtins.property
|
||||
// CHECK: def Variadic():
|
||||
// CHECK: def Variadic(self):
|
||||
// CHECK: return self.regions[0:]
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ constexpr const char *attributeDeleterTemplate = R"Py(
|
|||
|
||||
constexpr const char *regionAccessorTemplate = R"PY(
|
||||
@builtins.property
|
||||
def {0}():
|
||||
def {0}(self):
|
||||
return self.regions[{1}]
|
||||
)PY";
|
||||
|
||||
|
|
Loading…
Reference in New Issue