]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/d/dmd/iasmgcc.c
d: Merge upstream dmd 7132b3537
[thirdparty/gcc.git] / gcc / d / dmd / iasmgcc.c
index 5cc9025a7b312c38674be401840b9c59e8377432..e3940a8adbf4da0d4f1ce9114f5028e1b395959a 100644 (file)
@@ -1,6 +1,6 @@
 
 /* Compiler implementation of the D programming language
- * Copyright (C) 2018-2020 by The D Language Foundation, All Rights Reserved
+ * Copyright (C) 2018-2021 by The D Language Foundation, All Rights Reserved
  * written by Iain Buclaw
  * http://www.digitalmars.com
  * Distributed under the Boost Software License, Version 1.0.
  */
 
 #include "scope.h"
+#include "expression.h"
 #include "declaration.h"
 #include "errors.h"
 #include "parse.h"
 #include "statement.h"
 
-Expression *semantic(Expression *e, Scope *sc);
-Statement *semantic(Statement *s, Scope *sc);
-
 /***********************************
  * Parse list of extended asm input or output operands.
  * Grammar:
@@ -321,7 +319,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
     s->stc = sc->stc;
 
     // Fold the instruction template string.
-    s->insn = semantic(s->insn, sc);
+    s->insn = expressionSemantic(s->insn, sc);
     s->insn = s->insn->ctfeInterpret();
 
     if (s->insn->op != TOKstring || ((StringExp *) s->insn)->sz != 1)
@@ -336,7 +334,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
         for (size_t i = 0; i < s->args->length; i++)
         {
             Expression *e = (*s->args)[i];
-            e = semantic(e, sc);
+            e = expressionSemantic(e, sc);
             // Check argument is a valid lvalue/rvalue.
             if (i < s->outputargs)
                 e = e->modifiableLvalue(sc, NULL);
@@ -345,7 +343,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
             (*s->args)[i] = e;
 
             e = (*s->constraints)[i];
-            e = semantic(e, sc);
+            e = expressionSemantic(e, sc);
             assert(e->op == TOKstring && ((StringExp *) e)->sz == 1);
             (*s->constraints)[i] = e;
         }
@@ -357,7 +355,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
         for (size_t i = 0; i < s->clobbers->length; i++)
         {
             Expression *e = (*s->clobbers)[i];
-            e = semantic(e, sc);
+            e = expressionSemantic(e, sc);
             assert(e->op == TOKstring && ((StringExp *) e)->sz == 1);
             (*s->clobbers)[i] = e;
         }
@@ -373,7 +371,7 @@ Statement *gccAsmSemantic(GccAsmStatement *s, Scope *sc)
             if (!s->gotos)
                 s->gotos = new GotoStatements();
             s->gotos->push(gs);
-            semantic(gs, sc);
+            statementSemantic(gs, sc);
         }
     }