From 4bfa685d260f9a39755e5be25bc2ee555406cdc2 Mon Sep 17 00:00:00 2001 From: fruffy Date: Fri, 28 Oct 2022 13:49:29 -0400 Subject: [PATCH] Patchup. cpplint. Compilation. --- backends/p4tools/common/lib/util.h | 2 +- backends/p4tools/testgen/targets/bmv2/backend/stf/stf.cpp | 2 +- backends/p4tools/testgen/targets/bmv2/table_stepper.cpp | 6 +++--- backends/p4tools/testgen/targets/ebpf/backend/stf/stf.cpp | 2 +- ir/irutils.h | 6 +++--- lib/CMakeLists.txt | 4 ++-- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/backends/p4tools/common/lib/util.h b/backends/p4tools/common/lib/util.h index 7a44f01084d..d841af10a37 100644 --- a/backends/p4tools/common/lib/util.h +++ b/backends/p4tools/common/lib/util.h @@ -11,7 +11,7 @@ #include "backends/p4tools/common/lib/formulae.h" #include "ir/ir.h" -#include "lib/gmputil.h" +#include "lib/big_int_util.h" namespace P4Tools { diff --git a/backends/p4tools/testgen/targets/bmv2/backend/stf/stf.cpp b/backends/p4tools/testgen/targets/bmv2/backend/stf/stf.cpp index 87ff3ae4d3c..200509bd77c 100644 --- a/backends/p4tools/testgen/targets/bmv2/backend/stf/stf.cpp +++ b/backends/p4tools/testgen/targets/bmv2/backend/stf/stf.cpp @@ -20,7 +20,7 @@ #include "gsl/gsl-lite.hpp" #include "ir/ir.h" #include "ir/irutils.h" -#include "lib/gmputil.h" +#include "lib/big_int_util.h" #include "lib/log.h" #include "nlohmann/json.hpp" diff --git a/backends/p4tools/testgen/targets/bmv2/table_stepper.cpp b/backends/p4tools/testgen/targets/bmv2/table_stepper.cpp index 99e7f948469..46d8cd7d659 100644 --- a/backends/p4tools/testgen/targets/bmv2/table_stepper.cpp +++ b/backends/p4tools/testgen/targets/bmv2/table_stepper.cpp @@ -192,7 +192,7 @@ void BMv2_V1ModelTableStepper::evalTableActionSelector( // We get the unique name of the table coupled with the unique name of the action. // Getting the unique name is needed to avoid generating duplicate arguments. const auto& actionDataVar = - IRUtils::getZombieTableVar(parameter->type, table, "*actionData", idx, argIdx); + Utils::getZombieTableVar(parameter->type, table, "*actionData", idx, argIdx); cstring keyName = properties.tableName + "_param_" + actionName + std::to_string(argIdx); const auto& actionArg = nextState->createZombieConst(parameter->type, keyName); @@ -244,8 +244,8 @@ void BMv2_V1ModelTableStepper::evalTableActionSelector( std::vector replacements; replacements.emplace_back(new IR::MethodCallStatement(synthesizedAction)); - nextState->set(getTableHitVar(table), IRUtils::getBoolLiteral(true)); - nextState->set(getTableReachedVar(table), IRUtils::getBoolLiteral(true)); + nextState->set(getTableHitVar(table), IR::IRUtils::getBoolLiteral(true)); + nextState->set(getTableReachedVar(table), IR::IRUtils::getBoolLiteral(true)); std::stringstream tableStream; tableStream << "Table Branch: " << properties.tableName; tableStream << " Chosen action: " << actionName; diff --git a/backends/p4tools/testgen/targets/ebpf/backend/stf/stf.cpp b/backends/p4tools/testgen/targets/ebpf/backend/stf/stf.cpp index d38ff5d873a..c070172547d 100644 --- a/backends/p4tools/testgen/targets/ebpf/backend/stf/stf.cpp +++ b/backends/p4tools/testgen/targets/ebpf/backend/stf/stf.cpp @@ -21,7 +21,7 @@ #include "gsl/gsl-lite.hpp" #include "ir/ir.h" #include "ir/irutils.h" -#include "lib/gmputil.h" +#include "lib/big_int_util.h" #include "lib/log.h" #include "nlohmann/json.hpp" diff --git a/ir/irutils.h b/ir/irutils.h index ea2b41e6d09..2346e2100f6 100644 --- a/ir/irutils.h +++ b/ir/irutils.h @@ -1,5 +1,5 @@ -#ifndef _LIB_IRUTILS_H_ -#define _LIB_IRUTILS_H_ +#ifndef IR_IRUTILS_H_ +#define IR_IRUTILS_H_ #include @@ -95,4 +95,4 @@ class IRUtils { } // namespace IR -#endif /* _LIB_IRUTILS_H_ */ +#endif /* IR_IRUTILS_H_ */ diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 60bd5e12290..5ded40246dd 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -22,7 +22,7 @@ set (LIBP4CTOOLKIT_SRCS error_message.cpp exename.cpp gc.cpp - gmputil.cpp + big_int_util.cpp hash.cpp hex.cpp indent.cpp @@ -53,7 +53,7 @@ set (LIBP4CTOOLKIT_HDRS exceptions.h exename.h gc.h - gmputil.h + big_int_util.h hash.h hex.h indent.h