diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-15 17:43:31 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2020-06-16 23:34:20 +0200 |
commit | 15cf136abe0461f2bcf2ccf7a0e4e495f2362b75 (patch) | |
tree | d169c608afe720ea35458e1c0b729c877094e014 /gcc/d/toir.cc | |
parent | d873350a9c402a64cc333ef470131d427cf56b28 (diff) | |
download | gcc-15cf136abe0461f2bcf2ccf7a0e4e495f2362b75.zip gcc-15cf136abe0461f2bcf2ccf7a0e4e495f2362b75.tar.gz gcc-15cf136abe0461f2bcf2ccf7a0e4e495f2362b75.tar.bz2 |
d: Use toStringExp instead of explicit cast
gcc/d/ChangeLog:
* d-attribs.cc (build_attributes): Use toStringExp instead of cast.
* toir.cc (IRVisitor::visit): Likewise.
Diffstat (limited to 'gcc/d/toir.cc')
-rw-r--r-- | gcc/d/toir.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/gcc/d/toir.cc b/gcc/d/toir.cc index d8a14ef..130cbba 100644 --- a/gcc/d/toir.cc +++ b/gcc/d/toir.cc @@ -1292,7 +1292,7 @@ public: void visit (GccAsmStatement *s) { - StringExp *insn = (StringExp *)s->insn; + StringExp *insn = s->insn->toStringExp (); tree outputs = NULL_TREE; tree inputs = NULL_TREE; tree clobbers = NULL_TREE; @@ -1307,7 +1307,7 @@ public: const char *sname = name ? name->toChars () : NULL; tree id = name ? build_string (strlen (sname), sname) : NULL_TREE; - StringExp *constr = (StringExp *)(*s->constraints)[i]; + StringExp *constr = (*s->constraints)[i]->toStringExp (); const char *cstring = (const char *)(constr->len ? constr->string : ""); tree str = build_string (constr->len, cstring); @@ -1333,7 +1333,7 @@ public: { for (size_t i = 0; i < s->clobbers->length; i++) { - StringExp *clobber = (StringExp *)(*s->clobbers)[i]; + StringExp *clobber = (*s->clobbers)[i]->toStringExp (); const char *cstring = (const char *)(clobber->len ? clobber->string : ""); |