P4C
The P4 Compiler
Loading...
Searching...
No Matches
ParamBinding Class Reference

#include <param_binding.h>

Inheritance diagram for ParamBinding:
[legend]

Public Member Functions

 ParamBinding (const P4::TypeMap *typeMap, bool isV1=false)
 
void bind (const IR::Declaration_Variable *var)
 
void bind (const IR::Parameter *param)
 Add a new header or metadata instance bound to the given parameter.
 
const IR::InstanceRef * get (const IR::Declaration_Variable *var) const
 
const IR::InstanceRef * get (const IR::Parameter *param) const
 
void postorder (const IR::Declaration_Variable *var)
 
void postorder (const IR::Parameter *param)
 Add a new header or metadata instance bound to the given parameter.
 

Detailed Description

ParamBinding creates and tracks instances of package parameters and variable declarations.

Member Function Documentation

◆ bind() [1/2]

void ParamBinding::bind ( const IR::Declaration_Variable * var)

Add a new header or metadata instance bound to the given variable declaration.

◆ bind() [2/2]

void ParamBinding::bind ( const IR::Parameter * param)

Add a new header or metadata instance bound to the given parameter.

Copyright (C) 2024 Intel Corporation

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

SPDX-License-Identifier: Apache-2.0

◆ get() [1/2]

const IR::InstanceRef * ParamBinding::get ( const IR::Declaration_Variable * var) const
inline

Get the header or metadata instance previously bound to the given variable declaration.

◆ get() [2/2]

const IR::InstanceRef * ParamBinding::get ( const IR::Parameter * param) const
inline

Get the header or metadata instance previously bound to the given parameter.

◆ postorder()

void ParamBinding::postorder ( const IR::Declaration_Variable * var)

Add a new header or metadata instance bound to the given variable declaration.