Fix clang error (#4462)

This commit is contained in:
Wilson Snyder 2023-09-26 21:07:43 -04:00
parent a948be184c
commit 018d766179
2 changed files with 6 additions and 3 deletions

View File

@ -197,9 +197,11 @@ class EmitCModel final : public EmitCFunc {
puts("/// Returns time at next time slot. Aborts if !eventsPending()\n");
puts("uint64_t nextTimeSlot();\n");
puts("/// Trace signals in the model; called by application code\n");
puts("void trace(" + v3Global.opt.traceClassBase()
+ "C* tfp, int levels, int options = 0);\n");
if (v3Global.opt.trace() || !optSystemC()) {
puts("/// Trace signals in the model; called by application code\n");
puts("void trace(" + v3Global.opt.traceClassBase()
+ "C* tfp, int levels, int options = 0);\n");
}
if (v3Global.opt.trace() && optSystemC()) {
puts("/// SC tracing; avoid overloaded virtual function lint warning\n");
puts("void trace(sc_trace_file* tfp) const override { "

View File

@ -2245,6 +2245,7 @@ sub files_identical {
$l1[$l] =~ s/CPU Time: +[0-9.]+ seconds[^\n]+/CPU Time: ###/mig;
$l1[$l] =~ s/\?v=[0-9.]+/?v=latest/mig; # warning URL
$l1[$l] =~ s/_h[0-9a-f]{8}_/_h########_/mg;
$l1[$l] =~ s!%Error: \./!%Error: !mg; # clang gives ./ while GCC does not
$l1[$l] =~ s/ \/[^ ]+\/verilated_std.sv/ verilated_std.sv/mg;
if ($l1[$l] =~ s/Exiting due to.*/Exiting due to/mig) {
splice @l1, $l+1; # Trunc rest