From: Jason Lowe-Power Date: Sat, 23 May 2020 02:13:46 +0000 (-0700) Subject: systemc: Fix clang9 linker error X-Git-Tag: v20.0.0.0~15 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=80a263698323852b1951d8d71ca0d599dff7ef3c;p=gem5.git 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 --- 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;