// Variables.
- // Create an error variable. This is used for cases which should
- // not occur in a correct program, in order to keep the compilation
- // going without crashing.
- virtual Bvariable *error_variable () = 0;
-
// Create a global variable. NAME is the package-qualified name of
// the variable. ASM_NAME is the encoded identifier for the
// variable, incorporating the package, and made safe for the
// Variables.
- Bvariable *error_variable () { return new Bvariable (error_mark_node); }
-
Bvariable *global_variable (const std::string &var_name,
const std::string &asm_name, tree type,
bool is_external, bool is_hidden,
return build_fold_indirect_ref_loc (location, t);
}
+Bvariable *
+Bvariable::error_variable ()
+{
+ return new Bvariable (error_mark_node);
+}
+
// This file implements the interface between the Rust frontend proper
// and the gcc IR. This implements specific instantiations of
// abstract classes defined by the Rust frontend proper. The Rust
bool in_unique_section, location_t location)
{
if (type_tree == error_mark_node)
- return this->error_variable ();
+ return Bvariable::error_variable ();
// The GNU linker does not like dynamic variables with zero size.
tree orig_type_tree = type_tree;
location_t location)
{
if (type_tree == error_mark_node)
- return this->error_variable ();
+ return Bvariable::error_variable ();
tree decl = build_decl (location, VAR_DECL, get_identifier_from_string (name),
type_tree);
DECL_CONTEXT (decl) = function;
tree type_tree, location_t location)
{
if (type_tree == error_mark_node)
- return this->error_variable ();
+ return Bvariable::error_variable ();
tree decl = build_decl (location, PARM_DECL,
get_identifier_from_string (name), type_tree);
DECL_CONTEXT (decl) = function;
tree type_tree, location_t location)
{
if (type_tree == error_mark_node)
- return this->error_variable ();
+ return Bvariable::error_variable ();
tree decl = build_decl (location, PARM_DECL,
get_identifier_from_string (name), type_tree);
DECL_CONTEXT (decl) = fndecl;
|| fndecl == error_mark_node)
{
*pstatement = error_mark_node;
- return this->error_variable ();
+ return Bvariable::error_variable ();
}
tree var;