aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/backend/rust-compile.cc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2020-12-07 19:51:24 +0800
committerSimplyTheOther <simplytheother@gmail.com>2020-12-08 21:10:36 +0800
commitc7080f178a637cad04e196a404d5d44bb33189af (patch)
treea023eeee3f2c3ab85190e4967cfe0599b466843e /gcc/rust/backend/rust-compile.cc
parentdb39766514144dbbad34d9db3977c3a72d1216c3 (diff)
downloadgcc-c7080f178a637cad04e196a404d5d44bb33189af.zip
gcc-c7080f178a637cad04e196a404d5d44bb33189af.tar.gz
gcc-c7080f178a637cad04e196a404d5d44bb33189af.tar.bz2
Added more cfg stripping code
Diffstat (limited to 'gcc/rust/backend/rust-compile.cc')
-rw-r--r--gcc/rust/backend/rust-compile.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/rust/backend/rust-compile.cc b/gcc/rust/backend/rust-compile.cc
index d684c7d..3691f9e 100644
--- a/gcc/rust/backend/rust-compile.cc
+++ b/gcc/rust/backend/rust-compile.cc
@@ -88,21 +88,21 @@ bool
Compilation::compileVarDecl (Bfunction *fndecl, AST::LetStmt *stmt,
std::vector<Bvariable *> &vars)
{
- AST::Type *type = stmt->has_type () ? stmt->type.get () : stmt->inferedType;
+ AST::Type *type = stmt->has_type () ? stmt->get_type ().get () : stmt->inferedType;
translatedType = NULL;
type->accept_vis (*this);
if (translatedType == NULL)
{
- rust_error_at (stmt->locus, "failed to compile type for var decl");
+ rust_error_at (stmt->get_locus (), "failed to compile type for var decl");
return false;
}
- stmt->variables_pattern->accept_vis (*this);
+ stmt->get_pattern ()->accept_vis (*this);
for (auto &pattern : patternBuffer)
{
auto var = backend->local_variable (fndecl, pattern.get_ident (),
translatedType, NULL /*decl_var*/,
- false /*address_taken*/, stmt->locus);
+ false /*address_taken*/, stmt->get_locus ());
vars.push_back (var);
scope.InsertVar (pattern.get_ident (), var);
}
@@ -1298,7 +1298,7 @@ Compilation::visit (AST::LetStmt &stmt)
if (!stmt.has_init_expr ())
return;
- stmt.variables_pattern->accept_vis (*this);
+ stmt.get_pattern ()->accept_vis (*this);
for (auto &pattern : patternBuffer)
{
Bvariable *var = NULL;