P4C
The P4 Compiler
Loading...
Searching...
No Matches
check_header_refs.h
1
19#ifndef BF_P4C_COMMON_CHECK_HEADER_REFS_H_
20#define BF_P4C_COMMON_CHECK_HEADER_REFS_H_
21
22#include "backends/tofino/bf-p4c/common/utils.h"
23#include "ir/ir.h"
24
25using namespace P4;
26
33class CheckForHeaders final : public Inspector {
34 bool preorder(const IR::Member *) { return false; }
35 bool preorder(const IR::HeaderRef *h) {
36 if (h->toString() == "ghost::gh_intr_md") return false;
37 BUG("Header present in IR not under Member: %s", h->toString());
38 }
39};
40
41#endif /* BF_P4C_COMMON_CHECK_HEADER_REFS_H_ */
Definition check_header_refs.h:33
Definition visitor.h:400
TODO: this is not really specific to BMV2, it should reside somewhere else.
Definition applyOptionsPragmas.cpp:24