continue;
/* Attribute symbol must come from the `gcc.attribute' module. */
- Dsymbol *mod = (Dsymbol*) sym->getModule ();
+ Dsymbol *mod = (Dsymbol *) sym->getModule ();
if (!(strcmp (mod->toChars (), "attribute") == 0
&& mod->parent != NULL
&& strcmp (mod->parent->toChars (), "gcc") == 0
tree attributes = DECL_ATTRIBUTES (*node);
/* Push attribute always_inline. */
- if (! lookup_attribute ("always_inline", attributes))
+ if (!lookup_attribute ("always_inline", attributes))
DECL_ATTRIBUTES (*node) = tree_cons (get_identifier ("always_inline"),
NULL_TREE, attributes);
warning (OPT_Wattributes, "%qE attribute ignored", name);
*no_add_attrs = true;
}
- else if (! targetm.target_option.valid_attribute_p (*node, name, args, flags))
+ else if (!targetm.target_option.valid_attribute_p (*node, name, args, flags))
*no_add_attrs = true;
return NULL_TREE;
tree attributes = DECL_ATTRIBUTES (*node);
/* Push attribute noclone. */
- if (! lookup_attribute ("noclone", attributes))
+ if (!lookup_attribute ("noclone", attributes))
DECL_ATTRIBUTES (*node) = tree_cons (get_identifier ("noclone"),
NULL_TREE, attributes);
}
/* A static variable declaration is always a tentative definition,
but the alias is a non-tentative definition which overrides. */
|| (TREE_CODE (decl) != FUNCTION_DECL
- && ! TREE_PUBLIC (decl) && DECL_INITIAL (decl)))
+ && !TREE_PUBLIC (decl) && DECL_INITIAL (decl)))
{
error ("%q+D defined both normally and as %qE attribute", decl, name);
*no_add_attrs = true;
#include "d-target.h"
-static GTY(()) vec<tree, va_gc> *gcc_builtins_functions = NULL;
-static GTY(()) vec<tree, va_gc> *gcc_builtins_libfuncs = NULL;
-static GTY(()) vec<tree, va_gc> *gcc_builtins_types = NULL;
+static GTY(()) vec <tree, va_gc> *gcc_builtins_functions = NULL;
+static GTY(()) vec <tree, va_gc> *gcc_builtins_libfuncs = NULL;
+static GTY(()) vec <tree, va_gc> *gcc_builtins_types = NULL;
/* Record built-in types and their associated decls for re-use when
generating the `gcc.builtins' module. */
{ }
};
-static vec<builtin_data> builtin_converted_decls;
+static vec <builtin_data> builtin_converted_decls;
/* Build D frontend type from tree TYPE type given. This will set the
back-end type symbol directly for complex types to save build_ctype()
/* Return the GCC location for the D frontend location LOC. */
location_t
-make_location_t (const Loc& loc)
+make_location_t (const Loc &loc)
{
location_t gcc_location = input_location;
/* Build REAL_CST of type TOTYPE with the value VALUE. */
tree
-build_float_cst (const real_t& value, Type *totype)
+build_float_cst (const real_t &value, Type *totype)
{
real_t new_value;
TypeBasic *tb = totype->isTypeBasic ();
d_array_value (tree type, tree len, tree data)
{
tree len_field, ptr_field;
- vec<constructor_elt, va_gc> *ce = NULL;
+ vec <constructor_elt, va_gc> *ce = NULL;
gcc_assert (TYPE_DYNAMIC_ARRAY (type));
len_field = TYPE_FIELDS (type);
This function makes assumptions about interface layout. */
tree
-build_interface_binfo (tree super, ClassDeclaration *cd, unsigned& offset)
+build_interface_binfo (tree super, ClassDeclaration *cd, unsigned &offset)
{
tree binfo = make_tree_binfo (cd->baseclasses->length);
tree ctype = build_ctype (cd->type);
TYPE_DELEGATE (ctype) = 1;
}
- vec<constructor_elt, va_gc> *ce = NULL;
+ vec <constructor_elt, va_gc> *ce = NULL;
CONSTRUCTOR_APPEND_ELT (ce, TYPE_FIELDS (ctype), object);
CONSTRUCTOR_APPEND_ELT (ce, TREE_CHAIN (TYPE_FIELDS (ctype)), method);
/* Extract callee and object from T and return in to CALLEE and OBJECT. */
void
-extract_from_method_call (tree t, tree& callee, tree& object)
+extract_from_method_call (tree t, tree &callee, tree &object)
{
gcc_assert (METHOD_CALL_EXPR (t));
object = CONSTRUCTOR_ELT (t, 0)->value;
matches the layout of TYPE. */
tree
-build_struct_literal (tree type, vec<constructor_elt, va_gc> *init)
+build_struct_literal (tree type, vec <constructor_elt, va_gc> *init)
{
/* If the initializer was empty, use default zero initialization. */
if (vec_safe_is_empty (init))
return build_constructor (type, NULL);
- vec<constructor_elt, va_gc> *ve = NULL;
+ vec <constructor_elt, va_gc> *ve = NULL;
HOST_WIDE_INT offset = 0;
bool constant_p = true;
bool finished = false;
val = build_array_from_val (type->nextOf (), val);
size_t dims = type->isTypeSArray ()->dim->toInteger ();
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
vec_safe_reserve (elms, dims);
val = d_convert (etype, val);
If INCLUSIVE, we allow INDEX == LEN to return true also. */
tree
-build_bounds_condition (const Loc& loc, tree index, tree len, bool inclusive)
+build_bounds_condition (const Loc &loc, tree index, tree len, bool inclusive)
{
if (!array_bounds_check ())
return index;
}
/* Build the argument list for the call. */
- vec<tree, va_gc> *args = NULL;
+ vec <tree, va_gc> *args = NULL;
tree saved_args = NULL_TREE;
/* If this is a delegate call or a nested function being called as
/* Builds a call to AssertError or AssertErrorMsg. */
tree
-d_assert_call (const Loc& loc, libcall_fn libcall, tree msg)
+d_assert_call (const Loc &loc, libcall_fn libcall, tree msg)
{
tree file;
tree line = size_int (loc.linnum);
tree fields = TYPE_FIELDS (type);
/* The `this' field comes immediately after the `__chain'. */
tree thisfield = chain_index (1, fields);
- vec<constructor_elt, va_gc> *ve = NULL;
+ vec <constructor_elt, va_gc> *ve = NULL;
tree framefields = TYPE_FIELDS (FRAMEINFO_TYPE (ffo));
frame_ref = build_deref (frame_ref);
{
/* Build array as VECTOR_CST, assumes EXPR is constant. */
Expressions *elements = expr->isArrayLiteralExp ()->elements;
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
vec_safe_reserve (elms, elements->length);
for (size_t i = 0; i < elements->length; i++)
tree ctor = build_constructor (build_ctype (totype), NULL);
if (count)
{
- vec<constructor_elt, va_gc> *ce = NULL;
+ vec <constructor_elt, va_gc> *ce = NULL;
tree index = build2 (RANGE_EXPR, build_ctype (Type::tsize_t),
size_zero_node, size_int (count - 1));
tree value = convert_for_assignment (expr, etype, sa_type->next);
front-end, which does not get translated by the gcc diagnostic routines. */
static void ATTRIBUTE_GCC_DIAG(3,0)
-d_diagnostic_report_diagnostic (const Loc& loc, int opt, const char *format,
+d_diagnostic_report_diagnostic (const Loc &loc, int opt, const char *format,
va_list ap, diagnostic_t kind, bool verbatim)
{
va_list argp;
error count. */
void ATTRIBUTE_GCC_DIAG(2,3)
-error (const Loc& loc, const char *format, ...)
+error (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-verror (const Loc& loc, const char *format, va_list ap,
+verror (const Loc &loc, const char *format, va_list ap,
const char *prefix1, const char *prefix2, const char *)
{
if (!global.gag || global.params.showGaggedErrors)
This doesn't increase the global error count. */
void ATTRIBUTE_GCC_DIAG(2,3)
-errorSupplemental (const Loc& loc, const char *format, ...)
+errorSupplemental (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-verrorSupplemental (const Loc& loc, const char *format, va_list ap)
+verrorSupplemental (const Loc &loc, const char *format, va_list ap)
{
if (global.gag && !global.params.showGaggedErrors)
return;
global warning count. */
void ATTRIBUTE_GCC_DIAG(2,3)
-warning (const Loc& loc, const char *format, ...)
+warning (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-vwarning (const Loc& loc, const char *format, va_list ap)
+vwarning (const Loc &loc, const char *format, va_list ap)
{
if (!global.gag && global.params.warnings != DIAGNOSTICoff)
{
LOC. This doesn't increase the global warning count. */
void ATTRIBUTE_GCC_DIAG(2,3)
-warningSupplemental (const Loc& loc, const char *format, ...)
+warningSupplemental (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-vwarningSupplemental (const Loc& loc, const char *format, va_list ap)
+vwarningSupplemental (const Loc &loc, const char *format, va_list ap)
{
if (global.params.warnings == DIAGNOSTICoff || global.gag)
return;
error count depending on how deprecations are treated. */
void ATTRIBUTE_GCC_DIAG(2,3)
-deprecation (const Loc& loc, const char *format, ...)
+deprecation (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-vdeprecation (const Loc& loc, const char *format, va_list ap,
+vdeprecation (const Loc &loc, const char *format, va_list ap,
const char *prefix1, const char *prefix2)
{
if (global.params.useDeprecated == DIAGNOSTICerror)
location LOC. This does not increase the global error count. */
void ATTRIBUTE_GCC_DIAG(2,3)
-deprecationSupplemental (const Loc& loc, const char *format, ...)
+deprecationSupplemental (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-vdeprecationSupplemental (const Loc& loc, const char *format, va_list ap)
+vdeprecationSupplemental (const Loc &loc, const char *format, va_list ap)
{
if (global.params.useDeprecated == DIAGNOSTICerror)
verrorSupplemental (loc, format, ap);
/* Print a verbose message with explicit location LOC. */
void ATTRIBUTE_GCC_DIAG(2, 3)
-message (const Loc& loc, const char *format, ...)
+message (const Loc &loc, const char *format, ...)
{
va_list ap;
va_start (ap, format);
}
void ATTRIBUTE_GCC_DIAG(2,0)
-vmessage (const Loc& loc, const char *format, va_list ap)
+vmessage (const Loc &loc, const char *format, va_list ap)
{
d_diagnostic_report_diagnostic (loc, 0, format, ap, DK_NOTE, true);
}
}
bool
-Loc::equals (const Loc& loc)
+Loc::equals (const Loc &loc)
{
if (this->linnum != loc.linnum || this->charnum != loc.charnum)
return false;
static GTY(()) tree global_context;
/* Array of all global declarations to pass back to the middle-end. */
-static GTY(()) vec<tree, va_gc> *global_declarations;
+static GTY(()) vec <tree, va_gc> *global_declarations;
/* Support for GCC-style command-line make dependency generation.
Adds TARGET to the make dependencies target buffer.
Objc::_init ();
/* Back-end init. */
- global_binding_level = ggc_cleared_alloc<binding_level> ();
+ global_binding_level = ggc_cleared_alloc <binding_level> ();
current_binding_level = global_binding_level;
/* This allows the code in d-builtins.cc to not have to worry about
unsigned errors = global.startGagging ();
Module *m = Module::load (Loc (), NULL, Identifier::idPool ("__main"));
- if (! global.endGagging (errors))
+ if (!global.endGagging (errors))
{
m->importedFrom = m;
modules.push (m);
struct lang_type *
build_lang_type (Type *t)
{
- struct lang_type *lt = ggc_cleared_alloc<struct lang_type> ();
+ struct lang_type *lt = ggc_cleared_alloc <struct lang_type> ();
lt->type = t;
return lt;
}
there's no associated frontend symbol to refer to (yet). If the symbol
appears later in the compilation, then the slot will be re-used. */
if (d == NULL)
- return ggc_cleared_alloc<struct lang_decl> ();
+ return ggc_cleared_alloc <struct lang_decl> ();
struct lang_decl *ld = (d->csym) ? DECL_LANG_SPECIFIC (d->csym) : NULL;
if (ld == NULL)
- ld = ggc_cleared_alloc<struct lang_decl> ();
+ ld = ggc_cleared_alloc <struct lang_decl> ();
if (ld->decl == NULL)
ld->decl = d;
static void
d_dup_lang_specific_decl (tree node)
{
- if (! DECL_LANG_SPECIFIC (node))
+ if (!DECL_LANG_SPECIFIC (node))
return;
- struct lang_decl *ld = ggc_alloc<struct lang_decl> ();
+ struct lang_decl *ld = ggc_alloc <struct lang_decl> ();
memcpy (ld, DECL_LANG_SPECIFIC (node), sizeof (struct lang_decl));
DECL_LANG_SPECIFIC (node) = ld;
}
/* Assign a real_value to a longdouble type. */
void
-longdouble::set (real_value& d)
+longdouble::set (real_value &d)
{
real_convert (&this->rv (), TYPE_MODE (long_double_type_node), &d);
}
/* Overload numeric operators for longdouble types. */
longdouble
-longdouble::add (const longdouble& r) const
+longdouble::add (const longdouble &r) const
{
longdouble x;
real_arithmetic (&x.rv (), PLUS_EXPR, &this->rv (), &r.rv ());
}
longdouble
-longdouble::sub (const longdouble& r) const
+longdouble::sub (const longdouble &r) const
{
longdouble x;
real_arithmetic (&x.rv (), MINUS_EXPR, &this->rv (), &r.rv ());
}
longdouble
-longdouble::mul (const longdouble& r) const
+longdouble::mul (const longdouble &r) const
{
longdouble x;
real_arithmetic (&x.rv (), MULT_EXPR, &this->rv (), &r.rv ());
}
longdouble
-longdouble::div (const longdouble& r) const
+longdouble::div (const longdouble &r) const
{
longdouble x;
real_arithmetic (&x.rv (), RDIV_EXPR, &this->rv (), &r.rv ());
}
longdouble
-longdouble::mod (const longdouble& r) const
+longdouble::mod (const longdouble &r) const
{
longdouble x;
real_value q;
/* Overload equality operators for longdouble types. */
int
-longdouble::cmp (const longdouble& r) const
+longdouble::cmp (const longdouble &r) const
{
if (real_compare (LT_EXPR, &this->rv (), &r.rv ()))
return -1;
}
int
-longdouble::equals (const longdouble& r) const
+longdouble::equals (const longdouble &r) const
{
return real_compare (EQ_EXPR, &this->rv (), &r.rv ());
}
unsigned
Port::readwordLE (const void *buffer)
{
- const unsigned char *p = (const unsigned char*) buffer;
+ const unsigned char *p = (const unsigned char *) buffer;
return ((unsigned) p[1] << 8) | (unsigned) p[0];
}
unsigned
Port::readwordBE (const void *buffer)
{
- const unsigned char *p = (const unsigned char*) buffer;
+ const unsigned char *p = (const unsigned char *) buffer;
return ((unsigned) p[0] << 8) | (unsigned) p[1];
}
unsigned
Port::readlongLE (const void *buffer)
{
- const unsigned char *p = (const unsigned char*) buffer;
+ const unsigned char *p = (const unsigned char *) buffer;
return (((unsigned) p[3] << 24)
| ((unsigned) p[2] << 16)
unsigned
Port::readlongBE (const void *buffer)
{
- const unsigned char *p = (const unsigned char*) buffer;
+ const unsigned char *p = (const unsigned char *) buffer;
return (((unsigned) p[0] << 24)
| ((unsigned) p[1] << 16)
/* libgphobos is needed and should be linked statically. */
PHOBOS_STATIC,
/* libgphobos is needed and should be linked dynamically. */
- PHOBOS_DYNAMIC,
+ PHOBOS_DYNAMIC
};
static phobos_action phobos_library = PHOBOS_DEFAULT;
struct Loc;
template <typename TYPE> struct Array;
-typedef Array<Expression *> Expressions;
+typedef Array <Expression *> Expressions;
/* Usage of TREE_LANG_FLAG_?:
0: METHOD_CALL_EXPR
/* Stack of statement lists being collected while we are
compiling the function. */
- vec<tree, va_gc> *stmt_list;
+ vec <tree, va_gc> *stmt_list;
/* Variables that are in scope that will need destruction later. */
- vec<tree, va_gc> *vars_in_scope;
+ vec <tree, va_gc> *vars_in_scope;
/* Table of all used or defined labels in the function. */
- hash_map<Statement *, d_label_entry> *labels;
+ hash_map <Statement *, d_label_entry> *labels;
};
/* The D front end types have not been integrated into the GCC garbage
tree, tree);
extern tree build_array_struct_comparison (tree_code, StructDeclaration *,
tree, tree, tree);
-extern tree build_struct_literal (tree, vec<constructor_elt, va_gc> *);
+extern tree build_struct_literal (tree, vec <constructor_elt, va_gc> *);
extern tree component_ref (tree, tree);
extern tree build_assign (tree_code, tree, tree);
extern tree modify_expr (tree, tree);
d_mangle_decl (Dsymbol *decl)
{
if (decl->isFuncDeclaration ())
- return mangleExact ((FuncDeclaration *)decl);
+ return mangleExact ((FuncDeclaration *) decl);
else
{
OutBuffer buf;
d_finish_decl (d->csym);
/* Put out the vtbl[]. */
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
/* First entry is ClassInfo reference. */
if (d->vtblOffset ())
{
FuncDeclaration *fd = d->vtbl[i]->isFuncDeclaration ();
- if (fd && (fd->fbody || !d->isAbstract()))
+ if (fd && (fd->fbody || !d->isAbstract ()))
{
CONSTRUCTOR_APPEND_ELT (elms, size_int (i),
build_address (get_symbol_decl (fd)));
else
cfun->function_end_locus = DECL_SOURCE_LOCATION (fndecl);
- cfun->language = ggc_cleared_alloc<language_function> ();
+ cfun->language = ggc_cleared_alloc <language_function> ();
cfun->language->function = fd;
/* Default chain value is `null' unless parent found. */
{
ClassDeclaration *cd = exp->originalClass ();
tree type = TREE_TYPE (build_ctype (exp->value->stype));
- vec<constructor_elt, va_gc> *ve = NULL;
+ vec <constructor_elt, va_gc> *ve = NULL;
/* The set base vtable field. */
tree vptr = build_address (get_vtable_decl (cd));
tree var = build_local_temp (make_array_type (targselem, ndims));
/* Loop through each concatenation from right to left. */
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
CatExp *ce = e;
int dim = ndims - 1;
/* Multidimensional array allocations. */
tree tarray = make_array_type (Type::tsize_t, e->arguments->length);
tree var = build_local_temp (tarray);
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
/* Get the base element type for the array, generating the
initializer for the dims parameter along the way. */
if (tb->ty == Tsarray)
{
/* Turn the string into a constructor for the static array. */
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
vec_safe_reserve (elms, e->len);
tree etype = TREE_TYPE (type);
/* Build an expression that assigns the expressions in ELEMENTS to
a constructor. */
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
vec_safe_reserve (elms, e->elements->length);
bool constant_p = true;
tree saved_elems = NULL_TREE;
/* Build an expression that assigns all expressions in KEYS
to a constructor. */
- vec<constructor_elt, va_gc> *kelts = NULL;
+ vec <constructor_elt, va_gc> *kelts = NULL;
vec_safe_reserve (kelts, e->keys->length);
for (size_t i = 0; i < e->keys->length; i++)
{
tree akeys = build_constructor (tkeys, kelts);
/* Do the same with all expressions in VALUES. */
- vec<constructor_elt, va_gc> *velts = NULL;
+ vec <constructor_elt, va_gc> *velts = NULL;
vec_safe_reserve (velts, e->values->length);
for (size_t i = 0; i < e->values->length; i++)
{
/* Return an associative array pointed to by MEM. */
tree aatype = build_ctype (ta);
- vec<constructor_elt, va_gc> *ce = NULL;
+ vec <constructor_elt, va_gc> *ce = NULL;
CONSTRUCTOR_APPEND_ELT (ce, TYPE_FIELDS (aatype), mem);
this->result_ = build_nop (build_ctype (e->type),
/* Build a constructor that assigns the expressions in ELEMENTS
at each field index that has been filled in. */
- vec<constructor_elt, va_gc> *ve = NULL;
+ vec <constructor_elt, va_gc> *ve = NULL;
tree saved_elems = NULL_TREE;
/* CTFE may fill the hidden pointer by NullExp. */
if (e->e1->op == TOKarrayliteral)
{
ArrayLiteralExp *ale = e->e1->isArrayLiteralExp ();
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
bool constant_p = true;
vec_safe_reserve (elms, ale->elements->length);
{
public:
/* Return the hidden real_value from the longdouble type. */
- const real_value& rv (void) const
+ const real_value &rv (void) const
{ return *(const real_value *) this; }
- real_value& rv (void)
+ real_value &rv (void)
{ return *(real_value *) this; }
/* Normalize the value to be the precision supported by target. */
longdouble normalize (void);
/* No constructor to be able to use this class in a union. */
- template<typename T> longdouble& operator = (T x)
+ template <typename T> longdouble &operator = (T x)
{ set (x); return *this; }
/* Lvalue operators. */
- void set (real_value& d);
+ void set (real_value &d);
void set (int32_t d);
void set (int64_t d);
void set (uint32_t d);
{ return this->to_bool (); }
/* Arithmetic operators. */
- longdouble add (const longdouble& r) const;
- longdouble sub (const longdouble& r) const;
- longdouble mul (const longdouble& r) const;
- longdouble div (const longdouble& r) const;
- longdouble mod (const longdouble& r) const;
+ longdouble add (const longdouble &r) const;
+ longdouble sub (const longdouble &r) const;
+ longdouble mul (const longdouble &r) const;
+ longdouble div (const longdouble &r) const;
+ longdouble mod (const longdouble &r) const;
longdouble neg () const;
- longdouble operator + (const longdouble& r)
+ longdouble operator + (const longdouble &r)
{ return this->add (r); }
- longdouble operator - (const longdouble& r)
+ longdouble operator - (const longdouble &r)
{ return this->sub (r); }
- longdouble operator * (const longdouble& r)
+ longdouble operator * (const longdouble &r)
{ return this->mul (r); }
- longdouble operator / (const longdouble& r)
+ longdouble operator / (const longdouble &r)
{ return this->div (r); }
- longdouble operator % (const longdouble& r)
+ longdouble operator % (const longdouble &r)
{ return this->mod (r); }
- longdouble operator -()
+ longdouble operator - (void)
{ return this->neg (); }
/* Comparison operators. */
- int cmp (const longdouble& t) const;
- int equals (const longdouble& t) const;
+ int cmp (const longdouble &t) const;
+ int equals (const longdouble &t) const;
- bool operator < (const longdouble& r)
+ bool operator < (const longdouble &r)
{ return this->cmp (r) < 0; }
- bool operator <= (const longdouble& r)
+ bool operator <= (const longdouble &r)
{ return this->cmp (r) <= 0; }
- bool operator > (const longdouble& r)
+ bool operator > (const longdouble &r)
{ return this->cmp (r) > 0; }
- bool operator >= (const longdouble& r)
+ bool operator >= (const longdouble &r)
{ return this->cmp (r) >= 0; }
- bool operator == (const longdouble& r)
+ bool operator == (const longdouble &r)
{ return this->equals (r); }
- bool operator != (const longdouble& r)
+ bool operator != (const longdouble &r)
{ return !this->equals (r); }
private:
typedef longdouble volatile_longdouble;
/* Use ldouble() to explicitly create a longdouble value. */
-template<typename T>
+template <typename T>
inline longdouble
ldouble (T x)
{
struct GTY(()) module_info
{
- vec<tree, va_gc> *ctors;
- vec<tree, va_gc> *dtors;
- vec<tree, va_gc> *ctorgates;
+ vec <tree, va_gc> *ctors;
+ vec <tree, va_gc> *dtors;
+ vec <tree, va_gc> *ctorgates;
- vec<tree, va_gc> *sharedctors;
- vec<tree, va_gc> *shareddtors;
- vec<tree, va_gc> *sharedctorgates;
+ vec <tree, va_gc> *sharedctors;
+ vec <tree, va_gc> *shareddtors;
+ vec <tree, va_gc> *sharedctorgates;
- vec<tree, va_gc> *unitTests;
+ vec <tree, va_gc> *unitTests;
};
/* These must match the values in libdruntime/object_.d. */
/* Static constructors and destructors (not D `static this'). */
-static GTY(()) vec<tree, va_gc> *static_ctor_list;
-static GTY(()) vec<tree, va_gc> *static_dtor_list;
+static GTY(()) vec <tree, va_gc> *static_ctor_list;
+static GTY(()) vec <tree, va_gc> *static_dtor_list;
/* Returns an internal function identified by IDENT. This is used
by both module initialization and dso handlers. */
all variables in GATES, then calls the list of functions in FUNCTIONS. */
static tree
-build_funcs_gates_fn (tree ident, vec<tree, va_gc> *functions,
- vec<tree, va_gc> *gates)
+build_funcs_gates_fn (tree ident, vec <tree, va_gc> *functions,
+ vec <tree, va_gc> *gates)
{
tree expr_list = NULL_TREE;
tree dso_type = get_compiler_dso_type ();
tree dso = build_local_temp (dso_type);
- vec<constructor_elt, va_gc> *ve = NULL;
+ vec <constructor_elt, va_gc> *ve = NULL;
CONSTRUCTOR_APPEND_ELT (ve, NULL_TREE, build_integer_cst (1, size_type_node));
CONSTRUCTOR_APPEND_ELT (ve, NULL_TREE, build_address (dso_slot_node));
CONSTRUCTOR_APPEND_ELT (ve, NULL_TREE, build_address (start_minfo_node));
position. No alignment is taken into account, all fields are packed. */
static void
-layout_moduleinfo_field (tree type, tree rec_type, HOST_WIDE_INT& offset)
+layout_moduleinfo_field (tree type, tree rec_type, HOST_WIDE_INT &offset)
{
tree field = create_field_decl (type, NULL, 1, 1);
insert_aggregate_field (rec_type, field, offset);
/* Put out the two named fields in a ModuleInfo decl:
uint flags;
uint index; */
- vec<constructor_elt, va_gc> *minit = NULL;
+ vec <constructor_elt, va_gc> *minit = NULL;
CONSTRUCTOR_APPEND_ELT (minit, NULL_TREE,
build_integer_cst (flags, d_uint_type));
if (flags & MIimportedModules)
{
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
tree satype = make_array_type (Type::tvoidptr, aimports_dim);
size_t idx = 0;
if (flags & MIlocalClasses)
{
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
tree satype = make_array_type (Type::tvoidptr, aclasses.length);
for (size_t i = 0; i < aclasses.length; i++)
go out of scope. Queue them in LABELS. */
bool
-pop_label (Statement * const &, d_label_entry *ent, vec<tree> &labels)
+pop_label (Statement * const &, d_label_entry *ent, vec <tree> &labels)
{
if (!ent->bc_label)
{
push_binding_level (level_kind kind)
{
/* Add it to the front of currently active scopes stack. */
- binding_level *new_level = ggc_cleared_alloc<binding_level> ();
+ binding_level *new_level = ggc_cleared_alloc <binding_level> ();
new_level->level_chain = current_binding_level;
new_level->kind = kind;
static int
cmp_labels (const void *p1, const void *p2)
{
- const tree *l1 = (const tree *)p1;
- const tree *l2 = (const tree *)p2;
+ const tree *l1 = (const tree *) p1;
+ const tree *l2 = (const tree *) p2;
return DECL_UID (*l1) - DECL_UID (*l2);
}
/* Pop all the labels declared in the function. */
if (d_function_chain->labels)
{
- auto_vec<tree> labels;
- d_function_chain->labels->traverse<vec<tree> &, &pop_label> (labels);
+ auto_vec <tree> labels;
+ d_function_chain->labels->traverse <vec <tree> &,
+ &pop_label> (labels);
d_function_chain->labels->empty ();
labels.qsort (cmp_labels);
for (unsigned i = 0; i < labels.length (); ++i)
if (d_function_chain && d_function_chain->labels)
{
language_function *f = d_function_chain;
- f->labels->traverse<binding_level *, &pop_binding_label> (level);
+ f->labels->traverse <binding_level *, &pop_binding_label> (level);
}
current_binding_level->blocks
tree block = pop_binding_level ();
tree body = pop_stmt_list ();
- if (! BLOCK_VARS (block))
+ if (!BLOCK_VARS (block))
return body;
tree bind = build3 (BIND_EXPR, void_type_node,
gcc_assert (ent != NULL);
/* If the label hasn't been defined yet, defer checking. */
- if (! DECL_INITIAL (ent->label))
+ if (!DECL_INITIAL (ent->label))
{
- d_label_use_entry *fwdref = ggc_alloc<d_label_use_entry> ();
+ d_label_use_entry *fwdref = ggc_alloc <d_label_use_entry> ();
fwdref->level = current_binding_level;
fwdref->statement = from;
fwdref->next = ent->fwdrefs;
if (!d_function_chain->labels)
{
d_function_chain->labels
- = hash_map<Statement *, d_label_entry>::create_ggc (13);
+ = hash_map <Statement *, d_label_entry>::create_ggc (13);
}
d_label_entry *ent = d_function_chain->labels->get (s);
DECL_MODE (decl) = VOIDmode;
/* Create new empty slot. */
- ent = ggc_cleared_alloc<d_label_entry> ();
+ ent = ggc_cleared_alloc <d_label_entry> ();
ent->statement = s;
ent->label = decl;
/* Apparently the backend is supposed to sort and set the indexes
on the case array, have to change them to be usable. */
Type *satype = condtype->sarrayOf (s->cases->length);
- vec<constructor_elt, va_gc> *elms = NULL;
+ vec <constructor_elt, va_gc> *elms = NULL;
s->cases->sort ();
void visit (TypeAArray *t)
{
t->index->accept (this);
- visit ((TypeNext *)t);
+ visit ((TypeNext *) t);
}
void visit (TypeFunction *t)
{
- visit ((TypeNext *)t);
+ visit ((TypeNext *) t);
}
void visit (TypeStruct *t)