Skip to content

Commit feff135

Browse files
committed
Fix formatting on td files
1 parent 8c38500 commit feff135

File tree

3 files changed

+33
-29
lines changed

3 files changed

+33
-29
lines changed

clang/include/clang/CIR/Dialect/IR/CIRAttrs.td

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -605,13 +605,15 @@ def CIR_VTableAttr : CIR_Attr<"VTable", "vtable", [TypedAttrInterface]> {
605605
// AddressSpaceAttr
606606
//===----------------------------------------------------------------------===//
607607

608-
def CIR_AddressSpaceAttr : CIR_EnumAttr<CIR_AddressSpace, "address_space"> {
609-
let builders = [AttrBuilder<(ins "clang::LangAS":$langAS), [{
608+
def CIR_AddressSpaceAttr : CIR_EnumAttr<CIR_AddressSpace, "address_space"> {
609+
let builders = [
610+
AttrBuilder<(ins "clang::LangAS":$langAS), [{
610611
return $_get($_ctxt, cir::toCIRAddressSpace(langAS));
611-
}]>];
612+
}]>
613+
];
612614

613615
let assemblyFormat = [{
614-
`` custom<AddressSpaceValue>($value)
616+
`(` custom<AddressSpaceValue>($value) `)`
615617
}];
616618

617619
let defaultValue = "cir::AddressSpace::Default";

clang/include/clang/CIR/Dialect/IR/CIREnumAttr.td

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@ class CIR_DefaultValuedEnumParameter<EnumAttrInfo info, string value = "">
3535
let defaultValue = value;
3636
}
3737

38-
def CIR_AddressSpace
39-
: CIR_I32EnumAttr<
40-
"AddressSpace", "address space kind",
41-
[I32EnumAttrCase<"Default", 0, "default">,
42-
I32EnumAttrCase<"OffloadPrivate", 1, "offload_private">,
43-
I32EnumAttrCase<"OffloadLocal", 2, "offload_local">,
44-
I32EnumAttrCase<"OffloadGlobal", 3, "offload_global">,
45-
I32EnumAttrCase<"OffloadConstant", 4, "offload_constant">,
46-
I32EnumAttrCase<"OffloadGeneric", 5, "offload_generic">,
47-
I32EnumAttrCase<"Target", 6, "target">]> {
38+
def CIR_AddressSpace : CIR_I32EnumAttr<
39+
"AddressSpace", "address space kind", [
40+
I32EnumAttrCase<"Default", 0, "default">,
41+
I32EnumAttrCase<"OffloadPrivate", 1, "offload_private">,
42+
I32EnumAttrCase<"OffloadLocal", 2, "offload_local">,
43+
I32EnumAttrCase<"OffloadGlobal", 3, "offload_global">,
44+
I32EnumAttrCase<"OffloadConstant", 4, "offload_constant">,
45+
I32EnumAttrCase<"OffloadGeneric", 5, "offload_generic">,
46+
I32EnumAttrCase<"Target", 6, "target">
47+
]> {
4848
let description = [{
4949
The `address_space` attribute is used to represent address spaces for
5050
pointer types in CIR. It provides a unified model on top of `clang::LangAS`

clang/include/clang/CIR/Dialect/IR/CIRTypes.td

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -253,30 +253,32 @@ def CIR_PointerType : CIR_Type<"Pointer", "ptr", [
253253
```
254254
}];
255255

256-
let parameters = (ins "mlir::Type":$pointee,
257-
CIR_DefaultValuedEnumParameter<CIR_AddressSpace,
258-
"cir::AddressSpace::Default">:$addrSpace);
256+
let parameters = (ins
257+
"mlir::Type":$pointee,
258+
CIR_DefaultValuedEnumParameter<
259+
CIR_AddressSpace,
260+
"cir::AddressSpace::Default"
261+
>:$addrSpace
262+
);
259263

260264
let skipDefaultBuilders = 1;
261-
let builders = [TypeBuilderWithInferredContext<
262-
(ins "mlir::Type":$pointee,
263-
CArg<"cir::AddressSpace",
264-
"cir::AddressSpace::Default">:$addrSpace),
265-
[{
265+
let builders = [
266+
TypeBuilderWithInferredContext<(ins
267+
"mlir::Type":$pointee,
268+
CArg<"cir::AddressSpace", "cir::AddressSpace::Default">:$addrSpace), [{
266269
return $_get(pointee.getContext(), pointee, addrSpace);
267270
}]>,
268-
TypeBuilder<
269-
(ins "mlir::Type":$pointee,
270-
CArg<"cir::AddressSpace",
271-
"cir::AddressSpace::Default">:$addrSpace),
272-
[{
271+
TypeBuilder<(ins
272+
"mlir::Type":$pointee,
273+
CArg<"cir::AddressSpace", "cir::AddressSpace::Default">:$addrSpace), [{
273274
return $_get($_ctxt, pointee, addrSpace);
274-
}]>];
275+
}]>
276+
];
275277

276278
let assemblyFormat = [{
277279
`<`
278280
$pointee
279-
( `,` `addrspace` `(` custom<AddressSpaceValue>($addrSpace)^ `)` )?
281+
( `,` `addrspace` `(` `` custom<AddressSpaceValue>($addrSpace)^ `)` )?
280282
`>`
281283
}];
282284

0 commit comments

Comments
 (0)