diff options
Diffstat (limited to 'gcc/go/gofrontend/backend.h')
-rw-r--r-- | gcc/go/gofrontend/backend.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/gcc/go/gofrontend/backend.h b/gcc/go/gofrontend/backend.h index 601e7c9..b601105 100644 --- a/gcc/go/gofrontend/backend.h +++ b/gcc/go/gofrontend/backend.h @@ -516,15 +516,18 @@ class Backend // Create a local variable. The frontend will create the local // variables first, and then create the block which contains them. // FUNCTION is the function in which the variable is defined. NAME - // is the name of the variable. TYPE is the type. IS_ADDRESS_TAKEN - // is true if the address of this variable is taken (this implies - // that the address does not escape the function, as otherwise the - // variable would be on the heap). LOCATION is where the variable - // is defined. For each local variable the frontend will call - // init_statement to set the initial value. + // is the name of the variable. TYPE is the type. DECL_VAR, if not + // null, gives the location at which the value of this variable may + // be found, typically used to create an inner-scope reference to an + // outer-scope variable, to extend the lifetime of the variable beyond + // the inner scope. IS_ADDRESS_TAKEN is true if the address of this + // variable is taken (this implies that the address does not escape + // the function, as otherwise the variable would be on the heap). + // LOCATION is where the variable is defined. For each local variable + // the frontend will call init_statement to set the initial value. virtual Bvariable* local_variable(Bfunction* function, const std::string& name, Btype* type, - bool is_address_taken, Location location) = 0; + Bvariable* decl_var, bool is_address_taken, Location location) = 0; // Create a function parameter. This is an incoming parameter, not // a result parameter (result parameters are treated as local |