summaryrefslogtreecommitdiff
path: root/tools/common/debug.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@ucc.asn.au>2018-06-03 14:57:05 +0800
committerJohn Hodge <tpg@ucc.asn.au>2018-06-03 14:57:05 +0800
commitbf8f8b4b4a9fe273451be59f68acafbe61968b83 (patch)
tree82993550cb3c88de0edbd55d79e4ea8e8cefffac /tools/common/debug.cpp
parent39b3cf53798683e496804f8322da2254b10850f4 (diff)
parenta7fb27789a2b34543851d207120e2c0001ee9c27 (diff)
downloadmrust-bf8f8b4b4a9fe273451be59f68acafbe61968b83.tar.gz
Merge branch 'master' of https://github.com/thepowersgang/mrustc
Diffstat (limited to 'tools/common/debug.cpp')
-rw-r--r--tools/common/debug.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/common/debug.cpp b/tools/common/debug.cpp
index a3fb9956..94d8ed99 100644
--- a/tools/common/debug.cpp
+++ b/tools/common/debug.cpp
@@ -34,6 +34,14 @@ void Debug_DisablePhase(const char* phase_name)
{
gmDisabledDebug.insert( ::std::string(phase_name) );
}
+void Debug_EnablePhase(const char* phase_name)
+{
+ auto it = gmDisabledDebug.find(phase_name);
+ if( it != gmDisabledDebug.end() )
+ {
+ gmDisabledDebug.erase(it);
+ }
+}
void Debug_Print(::std::function<void(::std::ostream& os)> cb)
{
if( !Debug_IsEnabled() )