Skip to content

Commit

Permalink
style: pre-commit fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci[bot] committed Oct 28, 2023
1 parent fa0ebf9 commit 38f4496
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
18 changes: 9 additions & 9 deletions tools/netlist/include/Debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,20 @@
//------------------------------------------------------------------------------
#pragma once

#include <fmt/core.h>

#include "Config.h"
#include <fmt/core.h>

namespace netlist {

template <typename... T>
void DebugMessage(const char *filename, const int line, fmt::format_string<T...> fmt, T &&...args) {
fmt::print("{}:{}: ", filename, line);
fmt::print(fmt, std::forward<T>(args)...);
template<typename... T>
void DebugMessage(const char* filename, const int line, fmt::format_string<T...> fmt, T&&... args) {
fmt::print("{}:{}: ", filename, line);
fmt::print(fmt, std::forward<T>(args)...);
}

template <typename... T> void InfoMessage(fmt::format_string<T...> fmt, T &&...args) {
fmt::print(fmt, std::forward<T>(args)...);
template<typename... T>
void InfoMessage(fmt::format_string<T...> fmt, T&&... args) {
fmt::print(fmt, std::forward<T>(args)...);
}

} // namespace netlist
Expand All @@ -35,6 +35,6 @@ template <typename... T> void InfoMessage(fmt::format_string<T...> fmt, T &&...a
#endif

#define INFO_PRINT(str, ...) \
if (!Config::getInstance().quietEnabled) { \
if (!Config::getInstance().quietEnabled) { \
InfoMessage(str __VA_OPT__(, ) __VA_ARGS__); \
}
6 changes: 4 additions & 2 deletions tools/netlist/include/NetlistVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,12 @@ class VariableReferenceVisitor : public ast::ASTVisitor<VariableReferenceVisitor
prefixSymbol->getType());
node.bounds = {static_cast<int32_t>(bounds->first),
static_cast<int32_t>(bounds->second)};
} else {
}
else {
node.bounds = {0, getTypeBitWidth(expr.symbol.getType()) - 1};
}
DEBUG_PRINT("Variable reference: {} bounds {}:{}\n", node.toString(), node.bounds.lower(), node.bounds.upper());
DEBUG_PRINT("Variable reference: {} bounds {}:{}\n", node.toString(), node.bounds.lower(),
node.bounds.upper());

// Clear the selectors for the next named value.
selectors.clear();
Expand Down

0 comments on commit 38f4496

Please sign in to comment.