Modernize va args (#2214)
Verilator uses a form of variadic macros that are nonstandard, making it unable to be compiled under MSVC. Replace the old synax with the standard syntax. This fixes MSVC usage. Signed-off-by: Sean Cross <sean@xobs.io>
This commit is contained in:
parent
07d00f26aa
commit
a1a2650f1e
|
|
@ -31,6 +31,7 @@ Philipp Wagner
|
||||||
Pieter Kapsenberg
|
Pieter Kapsenberg
|
||||||
Richard Myers
|
Richard Myers
|
||||||
Sebastien Van Cauwenberghe
|
Sebastien Van Cauwenberghe
|
||||||
|
Sean Cross
|
||||||
Stefan Wallentowitz
|
Stefan Wallentowitz
|
||||||
Tobias Rosenkranz
|
Tobias Rosenkranz
|
||||||
Tobias Wölfel
|
Tobias Wölfel
|
||||||
|
|
|
||||||
|
|
@ -62,10 +62,10 @@
|
||||||
/// VL_COVER_INSERT(&m_cases[i], "comment", "Coverage Case", "i", cvtToNumStr(i));
|
/// VL_COVER_INSERT(&m_cases[i], "comment", "Coverage Case", "i", cvtToNumStr(i));
|
||||||
/// }
|
/// }
|
||||||
|
|
||||||
#define VL_COVER_INSERT(countp,args...) \
|
#define VL_COVER_INSERT(countp,...) \
|
||||||
VL_IF_COVER(VerilatedCov::_inserti(countp); \
|
VL_IF_COVER(VerilatedCov::_inserti(countp); \
|
||||||
VerilatedCov::_insertf(__FILE__, __LINE__); \
|
VerilatedCov::_insertf(__FILE__, __LINE__); \
|
||||||
VerilatedCov::_insertp("hier", name(), args))
|
VerilatedCov::_insertp("hier", name(), __VA_ARGS__))
|
||||||
|
|
||||||
//=============================================================================
|
//=============================================================================
|
||||||
/// Convert VL_COVER_INSERT value arguments to strings
|
/// Convert VL_COVER_INSERT value arguments to strings
|
||||||
|
|
|
||||||
|
|
@ -42,8 +42,8 @@
|
||||||
VL_FATAL_MT(__FILE__, __LINE__, "", \
|
VL_FATAL_MT(__FILE__, __LINE__, "", \
|
||||||
(std::string("%%Error: Unsupported DPI function: ")+VL_FUNC).c_str())
|
(std::string("%%Error: Unsupported DPI function: ")+VL_FUNC).c_str())
|
||||||
|
|
||||||
#define _VL_SVDPI_WARN(message...) \
|
#define _VL_SVDPI_WARN(...) \
|
||||||
VL_PRINTF_MT(message)
|
VL_PRINTF_MT(__VA_ARGS__)
|
||||||
|
|
||||||
// Function requires a "context" in the import declaration
|
// Function requires a "context" in the import declaration
|
||||||
#define _VL_SVDPI_CONTEXT_WARN() \
|
#define _VL_SVDPI_CONTEXT_WARN() \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue