Ivan Krysak
458cb1f3fe
CAttributeListBuilder: expose append method
2026-04-22 08:19:27 +00:00
Ivan Krysak
74fa16dd13
Introduce helper header emitter
2026-04-22 08:19:25 +00:00
Ivan Krysak
7ab3d590e0
Introduce type and global header emitter
2026-04-22 08:18:52 +00:00
Ivan Krysak
280d66a441
CTokenEmitter: wrap everything into a <div>
2026-04-22 06:33:56 +00:00
Ivan Krysak
c704aac1c5
CEmitter: add emitCategoryComment helper
2026-04-22 06:33:56 +00:00
Ivan Krysak
3bd8879948
CEmitter: Introduce doxygen emission helpers
2026-04-22 06:33:56 +00:00
Ivan Krysak
8c3cbcca23
DoxygenEmitter: add internal indentation support
2026-04-22 06:33:56 +00:00
Ivan Krysak
8e456cbca9
CDoxygenEmitter: add one-shot comment helpers
2026-04-22 06:33:56 +00:00
Ivan Krysak
30e8f4e53e
CDoxygenEmitter: introduce in-place factories
2026-04-22 06:33:56 +00:00
Ivan Krysak
141bddb241
CDoxygenEmitter: pull factories in as methods
2026-04-22 06:33:56 +00:00
Ivan Krysak
995a94877d
CDoxygenEmitter: factor configuration out
2026-04-22 06:33:56 +00:00
Ivan Krysak
d3e22a2b05
CTokenEmitter: add #pragma once helper
2026-04-22 06:33:56 +00:00
Ivan Krysak
6d76908858
Introduce TypeDefinitionEmitter
2026-04-22 06:33:38 +00:00
Ivan Krysak
d327cd3be5
emitCAttributes: introduce an array overload
2026-04-22 06:14:52 +00:00
Ivan Krysak
539a8370c6
CAttributeListBuilder: allow chaining the methods
...
This lets callees do stuff like:
```cpp
CAttributeListBuilder{Context}
.setOrUpdate<"_MY_ATTRIBUTE_1">()
.setOrUpdate<"_MY_ATTRIBUTE_2">()
.setOrUpdate<"_MY_ATTRIBUTE_3">()
.get()
```
2026-04-22 06:14:52 +00:00
Ivan Krysak
0189089930
Introduce TypeEmitterConfiguration
2026-04-22 06:14:52 +00:00
Ivan Krysak
f69a0345b7
CTokenEmitter: introduce Commentable region
2026-04-22 06:14:52 +00:00
Ivan Krysak
ac3df7460d
Introduce clift::ClassType::getCAttributes
2026-04-22 06:14:52 +00:00
Ivan Krysak
f1739e1a0f
IndentingEmitter: drop emitNewline
2026-04-22 06:14:50 +00:00
Ivan Krysak
f3df0e20b9
Minor improvements
2026-04-21 07:54:50 +00:00
Andrea Gussoni
4e3af009fe
Expressions: fold x[0] into *x
...
Implement a DDR rewriting for folding the `x[0]` into `*x`, in order
to avoid a useless verbose syntax. Due to concatenation of rewrites, we
will get `&(x[0])` transformed into `x`, which is the rewriting we are
aiming to.
2026-04-14 09:52:07 +02:00
Andrea Gussoni
e0a9f4f484
EmitFieldAccesses: ignore qualifiers on Types
2026-04-14 09:24:48 +02:00
Pietro Fezzardi
715a2e54b0
IndentingEmitter: initialize IndentationString
2026-04-13 11:39:55 +02:00
Pietro Fezzardi
e399f381ea
CommonTypeMethods: add getters for function types
2026-04-10 15:27:24 +02:00
Lauri Vasama
d813581ae4
Add DoxygenEmitter documentation
2026-04-09 18:37:46 +03:00
Lauri Vasama
c18164c25d
Simplify IndentingEmitter; make configurable
2026-04-09 18:37:46 +03:00
Lauri Vasama
79a4fbc808
Fix DoxygenEmitter line prefix emission
2026-04-09 18:37:46 +03:00
Lauri Vasama
9c76e1219f
Add ADT/LineRange.h
2026-04-09 18:37:46 +03:00
Lauri Vasama
4cadcafa2c
Move operand constraints from C++ to tablegen
2026-04-08 12:30:31 +03:00
Lauri Vasama
d35e54627c
Add Clift ValueType interface
...
Value types is the set of non-array object types. These types are
assignable, can be used as function parameters, and as return types
(along with void), and in other scenarios where the type must have usual
value-like behaviour with no weirdness (such as array decay).
2026-04-08 12:28:45 +03:00
Lauri Vasama
80731d1a10
Migrate users to new Clift type casts
2026-04-08 12:27:32 +03:00
Lauri Vasama
fb3cdbdf38
Rename ValueType to AddressableType
2026-04-08 12:26:18 +03:00
Lauri Vasama
29c935ac90
Replace Clift type category helpers with casts
2026-04-08 12:25:04 +03:00
Lauri Vasama
ecaec9b2f1
Add typedef-unwrapping Clift type casts
...
* `clift::unwrapped_isa`
* `clift::unwrapped_isa_and_present`
* `clift::unwrapped_cast`
* `clift::unwrapped_cast_if_present`
* `clift::unwrapped_dyn_cast`
* `clift::unwrapped_dyn_cast_if_present`
These casts first unwrap typedefs and then behave equivalently to their
usual LLVM counterparts.
2026-04-08 12:23:49 +03:00
Lauri Vasama
db2b57e867
Add Clift ObjectType type interface
2026-04-08 12:22:33 +03:00
Lauri Vasama
92ad229ff0
Move BytecodeClassAttr into a separate file
2026-04-08 12:21:16 +03:00
Lauri Vasama
9ba90e9b81
Replace ValueType with mlir::Type where applicable
...
`mlir::Type` is now used as the default C++ type for representing all
MLIR types, even when `ValueType` would be a valid constraint, unless
doing so provides a clear benefit in that specific context.
2026-04-08 12:20:00 +03:00
Lauri Vasama
f9a4cb6384
Split up clift::dealias
...
* `unwrapTypedefs` matches `dealias(T, /*IgnoreQualifiers=*/true)`.
* `collapseTypedefs` matches `dealias(T)`.
2026-04-08 12:18:42 +03:00
Lauri Vasama
be8351a17d
Split up Clift PrimitiveType
...
* PrimitiveType is now an interface.
* VoidKind is now VoidType.
* FloatKind is now FloatType.
* The integer kinds are now IntegerType with IntegerKind.
2026-04-08 12:18:10 +03:00
Lauri Vasama
a2be1b476a
Split up Clift CastOp
...
* DecayOp - array or function to pointer decay. Not shown in C.
* BitCastOp - bit-preserving conversion. Emitted as bit_cast if
necessary.
* ExtendOp - zero- or sign-extending conversion from any integer type to
any wider integer type.
* TruncateOp - truncating conversion from any integer type to any
narrower integer type.
* PtrResizeOp - resizes a pointer without changing its pointee type.
2026-04-08 12:11:54 +03:00
Lauri Vasama
4cd4de4f83
Improve Clift type tablegen definitions
2026-04-08 11:12:41 +03:00
Lauri Vasama
82ae097c18
Improve Clift operation type constraints
2026-04-08 11:12:41 +03:00
Lauri Vasama
5198af8ba7
Improve Clift free function type property helpers
2026-04-08 11:12:41 +03:00
Lauri Vasama
007ae24bb0
Simplify Clift expression pattern definitions
2026-04-08 11:12:41 +03:00
Lauri Vasama
03c9b2288f
Simplify Clift expression op definitions
2026-04-08 11:12:41 +03:00
Lauri Vasama
fae3bb5788
Remove unnecessary Clift operand type constraints
2026-04-08 11:12:41 +03:00
Lauri Vasama
7b25803333
Remove unused BasicStatementOp default argument
2026-04-08 11:12:41 +03:00
Lauri Vasama
dda0ef6292
Remove unused Clift_AnyLabelType constraint
2026-04-08 11:12:41 +03:00
Lauri Vasama
3b731330b9
Fix getPointeeType expression rewrite helper
2026-04-08 11:12:41 +03:00
Lauri Vasama
9e71f608b7
Fix Clift AliasableType description
2026-04-08 11:12:41 +03:00