Add debug annotation for unusual code paths

This commit is contained in:
Danny Robson 2012-04-24 17:38:07 +10:00
parent 82f90f3f6c
commit 73f483c06b
2 changed files with 7 additions and 0 deletions

View File

@ -64,3 +64,9 @@ void
unreachable (const std::string& what) { unreachable (const std::string& what) {
panic (" Unreachable code executed: " + what); panic (" Unreachable code executed: " + what);
} }
void
unusual (void) {
panic ("Unusual code path found.");
}

View File

@ -149,6 +149,7 @@ void panic (void) terminal;
void not_implemented (void) terminal; void not_implemented (void) terminal;
void unreachable (void) terminal; void unreachable (void) terminal;
void unreachable (const std::string&) terminal; void unreachable (const std::string&) terminal;
void unusual (void);
void breakpoint (void); void breakpoint (void);