P4C
The P4 Compiler
Loading...
Searching...
No Matches
P4::ControlPlaneAPI::FlattenHeader Class Reference

Flattens a header type "locally", without modifying the IR. More...

#include <flattenHeader.h>

Static Public Member Functions

static const IR::Type_Header * flatten (P4::TypeMap *typeMap, const IR::Type_Header *headerType)
 

Detailed Description

Flattens a header type "locally", without modifying the IR.

Member Function Documentation

◆ flatten()

const IR::Type_Header * P4::ControlPlaneAPI::FlattenHeader::flatten ( P4::TypeMap * typeMap,
const IR::Type_Header * headerType )
static

If the @headerType needs flattening, creates a clone of the IR node with a new flattened field list. Otherwise returns @headerType. This does not modify the IR.