From 80a263698323852b1951d8d71ca0d599dff7ef3c Mon Sep 17 00:00:00 2001 From: Jason Lowe-Power Date: Fri, 22 May 2020 19:13:46 -0700 Subject: [PATCH] systemc: Fix clang9 linker error Likely a compiler bug, but if this function is allowed to be inlined, clang9 throws a linker error. Fix this error by making sure the function isn't inlined. Change-Id: I4bfade889796915e7bb4b224eafa6e72d4ec59da Issue-on: https://gem5.atlassian.net/projects/GEM5/issues/GEM5-597 Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/29394 Maintainer: Bobby R. Bruce Reviewed-by: Hoa Nguyen Tested-by: kokoro --- src/systemc/core/scheduler.cc | 7 +++++++ src/systemc/core/scheduler.hh | 7 +------ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/systemc/core/scheduler.cc b/src/systemc/core/scheduler.cc index 179bd5523..f94c20499 100644 --- a/src/systemc/core/scheduler.cc +++ b/src/systemc/core/scheduler.cc @@ -479,6 +479,13 @@ Scheduler::scheduleStop(bool finish_delta) schedule(&stopEvent); } +void +Scheduler::scheduleTimeAdvancesEvent() +{ + if (!traceFiles.empty() && !timeAdvancesEvent.scheduled()) + schedule(&timeAdvancesEvent); +} + void Scheduler::trace(bool delta) { diff --git a/src/systemc/core/scheduler.hh b/src/systemc/core/scheduler.hh index c9ca161cf..e7c7290e3 100644 --- a/src/systemc/core/scheduler.hh +++ b/src/systemc/core/scheduler.hh @@ -459,12 +459,7 @@ class Scheduler void timeAdvances() { trace(false); } EventWrapper timeAdvancesEvent; - void - scheduleTimeAdvancesEvent() - { - if (!traceFiles.empty() && !timeAdvancesEvent.scheduled()) - schedule(&timeAdvancesEvent); - } + void scheduleTimeAdvancesEvent(); uint64_t _numCycles; uint64_t _changeStamp; -- 2.30.2