Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Promote
P4
to be THE project-wise top-level namespace (#4825)
* Introduce top-level namespace p4c to the lib/ dir Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace Util to p4c::Util Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace Test to p4c::Test Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace IR to p4c::IR Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace P4 to p4c::P4 Signed-off-by: Bili Dong <qobilidop@gmail.com> * Make sure all midend/ C++ code is under namespace p4c Signed-off-by: Bili Dong <qobilidop@gmail.com> * Make sure all frontend/ code is under namespace p4c Signed-off-by: Bili Dong <qobilidop@gmail.com> * Make sure all ir/ code is under namespace p4c Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace BMV2 to p4c::BMV2 Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace DPDK to p4c::DPDK Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace EBPF to p4c::EBPF Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace graphs to p4c::graphs Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace TC to p4c::TC Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change top-level namespace UBPF to p4c::UBPF Signed-off-by: Bili Dong <qobilidop@gmail.com> * Fully qualify `using namespace p4c` to be `using namespace ::p4c` Signed-off-by: Bili Dong <qobilidop@gmail.com> * Make sure all backends/ code is under namespace p4c Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address some compiling issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address remaining compiling issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Apply clang-format Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address cpplint issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Update bazel/example/ code Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address remaining namespace issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Try fixing the macOS compiling issue Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address linter issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Revert the past few changes as they didn't work Signed-off-by: Bili Dong <qobilidop@gmail.com> * Change namespace naming from p4c to P4C Signed-off-by: Bili Dong <qobilidop@gmail.com> * Fix wrong replacements Signed-off-by: Bili Dong <qobilidop@gmail.com> * Add namespace P4C to newly added code Signed-off-by: Bili Dong <qobilidop@gmail.com> * Resolve some #include within namespace issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Switch to use `P4` as THE top-level namespace And avoid nested `P4::P4` namespace. Signed-off-by: Bili Dong <qobilidop@gmail.com> * Recover Ubuntu 18.04 support Signed-off-by: Bili Dong <qobilidop@gmail.com> * Avoid introducing new symbols into `namespace std` Signed-off-by: Bili Dong <qobilidop@gmail.com> * Resolve compiling issues for newly updated code Signed-off-by: Bili Dong <qobilidop@gmail.com> * Address review comments Signed-off-by: Bili Dong <qobilidop@gmail.com> * Further address compiling issues Signed-off-by: Bili Dong <qobilidop@gmail.com> * Apply namespace updates to newly added code Signed-off-by: Bili Dong <qobilidop@gmail.com> * Convert `using namespace ::P4` back to `using namespace P4` Signed-off-by: Bili Dong <qobilidop@gmail.com> * Use `::P4` consistently in macros under lib/ Signed-off-by: Bili Dong <qobilidop@gmail.com> * Fix more `P4` namespace usage in macros Signed-off-by: Bili Dong <qobilidop@gmail.com> --------- Signed-off-by: Bili Dong <qobilidop@gmail.com>
- Loading branch information