aboutsummaryrefslogtreecommitdiff
path: root/gcc/go/gofrontend/escape.h
diff options
context:
space:
mode:
authorChris Manghane <cmang@google.com>2016-08-02 21:43:48 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2016-08-02 21:43:48 +0000
commit7295570dd4a8099c010d511ffb3327fd8b0e36d7 (patch)
treeac31176b0c6aef7d08708c3dacd42fb6edbc23d4 /gcc/go/gofrontend/escape.h
parent00803109af736deacbec676f03564c7cafce7eea (diff)
downloadgcc-7295570dd4a8099c010d511ffb3327fd8b0e36d7.zip
gcc-7295570dd4a8099c010d511ffb3327fd8b0e36d7.tar.gz
gcc-7295570dd4a8099c010d511ffb3327fd8b0e36d7.tar.bz2
escape: Add basic debugging.
Emit basic debug information when compiling with the flag -fgo-debug-escape#. Reviewed-on: https://go-review.googlesource.com/22376 2016-08-02 Chris Manghane <cmang@google.com> * lang.opt: Add -fgo-debug-escape option. * go-c.h (go_create_gogo): Add debug_escape_level parameter. * go-lang.c (go_langhook_init): Pass go_debug_escape_level to go_create_gogo. From-SVN: r239002
Diffstat (limited to 'gcc/go/gofrontend/escape.h')
-rw-r--r--gcc/go/gofrontend/escape.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/go/gofrontend/escape.h b/gcc/go/gofrontend/escape.h
index 2278c47..e6d1a3d 100644
--- a/gcc/go/gofrontend/escape.h
+++ b/gcc/go/gofrontend/escape.h
@@ -193,6 +193,17 @@ class Node
Location
location() const;
+ // Return this node's AST formatted string.
+ std::string
+ ast_format(Gogo*) const;
+
+ // Return this node's detailed format string.
+ std::string
+ details() const;
+
+ std::string
+ op_format() const;
+
// Return this node's escape state.
Escape_state*
state(Escape_context* context, Named_object* fn);
@@ -343,6 +354,10 @@ class Escape_context
set_current_function(Named_object* fn)
{ this->current_function_ = fn; }
+ // Return the name of the current function.
+ std::string
+ current_function_name() const;
+
// Return true if this is the context for a mutually recursive set of functions.
bool
recursive() const