base: Replace a "panic" in cprintf with an M5_UNREACHABLE.
authorGabe Black <gabe.black@gmail.com>
Thu, 4 Feb 2021 06:33:30 +0000 (22:33 -0800)
committerGabe Black <gabe.black@gmail.com>
Fri, 5 Feb 2021 08:36:14 +0000 (08:36 +0000)
The panic was just to signal that a point in the code should be
unreachable, and brought with it a thread of dependencies which would
bring in more and more extra files as it was followed.

Change-Id: I46fb99b91929dca78a6547bdc7635aab9a63a9f3
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/40615
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Daniel Carvalho <odanrc@yahoo.com.br>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>

src/base/cprintf.cc

index 03fa3cb8f3b0b51e909a6ea2f47963b8a6d1f533..7a3e958f28eb189a926e759800a2d51c00c91bf1 100644 (file)
@@ -33,7 +33,6 @@
 #include <sstream>
 
 #include "base/compiler.hh"
-#include "base/logging.hh"
 
 namespace cp
 {
@@ -239,7 +238,7 @@ Print::processFlag()
             break;
 
           case '%':
-            panic("we shouldn't get here");
+            M5_UNREACHABLE;
             break;
 
           default: