P4C
The P4 Compiler
Loading...
Searching...
No Matches
name_gateways.h
1/*
2 * SPDX-FileCopyrightText: 2013 Barefoot Networks, Inc.
3 * Copyright 2013-present Barefoot Networks, Inc.
4 *
5 * SPDX-License-Identifier: Apache-2.0
6 */
7
8#ifndef FRONTENDS_COMMON_NAME_GATEWAYS_H_
9#define FRONTENDS_COMMON_NAME_GATEWAYS_H_
10
11#include "ir/ir.h"
12
13namespace P4 {
14
15class NameGateways : public Transform {
16 const IR::Node *preorder(IR::If *n) override { return new IR::NamedCond(*n); }
17 const IR::Node *preorder(IR::NamedCond *n) override { return n; }
18};
19
20} // namespace P4
21
22#endif /* FRONTENDS_COMMON_NAME_GATEWAYS_H_ */
Definition node.h:44
Definition name_gateways.h:15
Definition visitor.h:433
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:13