clang 24.0.0git
cir::RecordRewritingTypeConverter Class Reference

A type converter that converts the types nested in pointers, arrays, functions and records. More...

#include "/work/as-worker-4/publish-doxygen-docs/llvm-project/clang/lib/CIR/Dialect/Transforms/RecordTypeConverter.h"

Inheritance diagram for cir::RecordRewritingTypeConverter:
[legend]

Public Member Functions

 RecordRewritingTypeConverter (mlir::MLIRContext &context)
virtual ~RecordRewritingTypeConverter ()=default
void restoreRecordTypeNames ()
 Remove the temporary name of every record rebuilt by this converter.

Detailed Description

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.

Definition at line 39 of file RecordTypeConverter.h.

Constructor & Destructor Documentation

◆ RecordRewritingTypeConverter()

RecordRewritingTypeConverter::RecordRewritingTypeConverter ( mlir::MLIRContext & context)
explicit

Definition at line 20 of file RecordTypeConverter.cpp.

◆ ~RecordRewritingTypeConverter()

virtual cir::RecordRewritingTypeConverter::~RecordRewritingTypeConverter ( )
virtualdefault

Member Function Documentation

◆ restoreRecordTypeNames()

void RecordRewritingTypeConverter::restoreRecordTypeNames ( )

Remove the temporary name of every record rebuilt by this converter.

Definition at line 62 of file RecordTypeConverter.cpp.


The documentation for this class was generated from the following files: