aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-expr.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-01-05 17:49:01 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-01-06 10:13:39 +0000
commit1a97dbc6b54cd77ba7c3f00cb8dd2e870017a83c (patch)
tree8fc0819dcb268ce0a36e63d4947563aca056529b /gcc/rust/ast/rust-expr.h
parent4d590e5d210492444c4a2b69282970d683cf7c8d (diff)
downloadgcc-1a97dbc6b54cd77ba7c3f00cb8dd2e870017a83c.zip
gcc-1a97dbc6b54cd77ba7c3f00cb8dd2e870017a83c.tar.gz
gcc-1a97dbc6b54cd77ba7c3f00cb8dd2e870017a83c.tar.bz2
Examine the Suffix hint on integers to apply apropriate TyTy type.
This change propagates the PrimitiveCoreType to AST and HIR so the suffix can be examined.
Diffstat (limited to 'gcc/rust/ast/rust-expr.h')
-rw-r--r--gcc/rust/ast/rust-expr.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/rust/ast/rust-expr.h b/gcc/rust/ast/rust-expr.h
index 584e210..8baf7b7 100644
--- a/gcc/rust/ast/rust-expr.h
+++ b/gcc/rust/ast/rust-expr.h
@@ -50,10 +50,10 @@ public:
Literal::LitType get_lit_type () const { return literal.get_lit_type (); }
LiteralExpr (std::string value_as_string, Literal::LitType type,
- Location locus,
+ PrimitiveCoreType type_hint, Location locus,
std::vector<Attribute> outer_attrs = std::vector<Attribute> ())
: ExprWithoutBlock (std::move (outer_attrs)),
- literal (std::move (value_as_string), type), locus (locus)
+ literal (std::move (value_as_string), type, type_hint), locus (locus)
{}
LiteralExpr (Literal literal, Location locus,