Skip to content

Commit acdaa1a

Browse files
better name() handling
Signed-off-by: Mark Burton <[email protected]>
1 parent d520580 commit acdaa1a

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

report/include/scp/report.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ struct ScLogger {
412412
#define SCP_LOGGER_NAME(x) CAT(_m_scp_log_level_cache_, x)
413413

414414
/* User interface macros */
415-
#define SCMOD this->name()
415+
#define SCMOD this->sc_core::sc_module::name()
416416
#define SCP_LOGGER(...) \
417417
scp::scp_logger_cache IIF(IS_PAREN(FIRST_ARG(__VA_ARGS__)))( \
418418
SCP_LOGGER_NAME(EXPAND(FIRST_ARG FIRST_ARG(__VA_ARGS__))), \
@@ -430,7 +430,8 @@ struct ScLogger {
430430
class call_sc_name_fn
431431
{
432432
template <class T>
433-
static auto test(T* p) -> decltype(p->name(), std::true_type());
433+
static auto test(T* p)
434+
-> decltype(p->sc_core::sc_module::name(), std::true_type());
434435
template <class T>
435436
static auto test(...) -> decltype(std::false_type());
436437

@@ -442,7 +443,7 @@ class call_sc_name_fn
442443
template <class TYPE>
443444
auto operator()(TYPE* p) const
444445
-> std::enable_if_t<has_method<TYPE>, const char*> {
445-
return p->name();
446+
return p->sc_core::sc_module::name();
446447
}
447448

448449
// define a function IF NOT the method exists

0 commit comments

Comments
 (0)