P4C
The P4 Compiler
Loading...
Searching...
No Matches
switchAddDefault.h
1
/*
2
* Copyright 2020 Barefoot Networks, Inc.
3
* SPDX-FileCopyrightText: 2020 Barefoot Networks, Inc.
4
*
5
* SPDX-License-Identifier: Apache-2.0
6
*/
7
8
#ifndef FRONTENDS_P4_SWITCHADDDEFAULT_H_
9
#define FRONTENDS_P4_SWITCHADDDEFAULT_H_
10
11
#include "ir/ir.h"
12
#include "ir/visitor.h"
13
14
namespace
P4
{
15
16
/*
17
* find switch statements that do not cover all possible cases in their case list (no
18
* default: case and at least one action tag with no case) and add a default: {}
19
* case that does nothing.
20
*/
21
class
SwitchAddDefault
:
public
Modifier
{
22
public
:
23
void
postorder(IR::SwitchStatement *)
override
;
24
};
25
26
}
// namespace P4
27
28
#endif
/* FRONTENDS_P4_SWITCHADDDEFAULT_H_ */
P4::Modifier
Definition
visitor.h:385
P4::SwitchAddDefault
Definition
switchAddDefault.h:21
P4
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition
applyOptionsPragmas.cpp:13
frontends
p4
switchAddDefault.h
Generated by
1.13.2