|
clang 24.0.0git
|
A type converter that converts the types nested in pointers, arrays, functions and records. More...
Public Member Functions | |
| RecordRewritingTypeConverter (mlir::MLIRContext &context) | |
| virtual | ~RecordRewritingTypeConverter ()=default |
| void | restoreRecordTypeNames () |
| Remove the temporary name of every record rebuilt by this converter. | |
Protected Member Functions | |
| virtual bool | typeMayChange (mlir::Type type) const |
Whether type itself, ignoring nested types, may change. | |
A type converter that converts the types nested in pointers, arrays, functions and records.
Identified records can't be modified in place, so each one is rebuilt under a temporary name (see RecordType::getABIConvertedName). The conversion keeps a stack of the records being converted, which resolves recursive records. Once the conversion is done, restoreRecordTypeNames() gives the rebuilt records their original names back.
Subclasses add conversions for the types they rewrite. The type converter tries the most recently added conversion first, so a subclass can also replace one of the conversions registered here.
Every record is rebuilt unless typeMayChange() is overridden.
Definition at line 42 of file RecordTypeConverter.h.
|
explicit |
Definition at line 20 of file RecordTypeConverter.cpp.
|
virtualdefault |
| void RecordRewritingTypeConverter::restoreRecordTypeNames | ( | ) |
Remove the temporary name of every record rebuilt by this converter.
Definition at line 62 of file RecordTypeConverter.cpp.
|
inlineprotectedvirtual |
Whether type itself, ignoring nested types, may change.
Records are rebuilt only if some type they reach returns true.
Definition at line 53 of file RecordTypeConverter.h.