aboutsummaryrefslogtreecommitdiff
path: root/gcc/d/expr.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/d/expr.cc')
-rw-r--r--gcc/d/expr.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/d/expr.cc b/gcc/d/expr.cc
index f8d6876..dd7ebc8 100644
--- a/gcc/d/expr.cc
+++ b/gcc/d/expr.cc
@@ -1186,6 +1186,14 @@ public:
this->result_ = build_assign (modifycode, t1, t2);
}
+ /* Build a throw expression. */
+
+ void visit (ThrowExp *e)
+ {
+ tree arg = build_expr_dtor (e->e1);
+ this->result_ = build_libcall (LIBCALL_THROW, Type::tvoid, 1, arg);
+ }
+
/* Build a postfix expression. */
void visit (PostExp *e)