From 58fa2857e123a44b1633628b898847773153c047 Mon Sep 17 00:00:00 2001 From: Nilay Vaish Date: Wed, 22 Dec 2010 23:15:24 -0600 Subject: This patch removes the WARN_* and ERROR_* from src/mem/ruby/common/Debug.hh file. These statements have been replaced with warn(), panic() and fatal() defined in src/base/misc.hh --- src/mem/slicc/symbols/Type.py | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'src/mem/slicc/symbols/Type.py') diff --git a/src/mem/slicc/symbols/Type.py b/src/mem/slicc/symbols/Type.py index cefae16ae..d6e156908 100644 --- a/src/mem/slicc/symbols/Type.py +++ b/src/mem/slicc/symbols/Type.py @@ -511,6 +511,7 @@ std::ostream& operator<<(std::ostream& out, const ${{self.c_ident}}& obj); #include #include +#include "base/misc.hh" #include "mem/protocol/${{self.c_ident}}.hh" using namespace std; @@ -548,8 +549,7 @@ ${{self.c_ident}}_to_string(const ${{self.c_ident}}& obj) # Trailer code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); - return ""; + panic("Invalid range for type ${{self.c_ident}}"); } } @@ -570,8 +570,7 @@ string_to_${{self.c_ident}}(const string& str) code(''' } else { - WARN_EXPR(str); - ERROR_MSG("Invalid string conversion for type ${{self.c_ident}}"); + panic("Invalid string conversion for %s, type ${{self.c_ident}}", str); } } @@ -613,8 +612,7 @@ ${{self.c_ident}}_base_level(const ${{self.c_ident}}& obj) return ${{len(self.enums)}}; default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); - return -1; + panic("Invalid range for type ${{self.c_ident}}"); } } @@ -638,8 +636,7 @@ ${{self.c_ident}}_from_base_level(int type) # Trailer code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); - return MachineType_NUM; + panic("Invalid range for type ${{self.c_ident}}"); } } @@ -666,8 +663,7 @@ ${{self.c_ident}}_base_number(const ${{self.c_ident}}& obj) code(''' default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); - return -1; + panic("Invalid range for type ${{self.c_ident}}"); } return base; @@ -693,8 +689,7 @@ ${{self.c_ident}}_base_count(const ${{self.c_ident}}& obj) code(''' case ${{self.c_ident}}_NUM: default: - ERROR_MSG("Invalid range for type ${{self.c_ident}}"); - return -1; + panic("Invalid range for type ${{self.c_ident}}"); } } ''') -- cgit v1.2.3