Hi, This patch removes the setting of all target-specific global.params flags from the D front-end. Now that all dependencies on these flags have been removed, there's no need to test and set them.
Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and committed to mainline. Regards Iain. --- gcc/d/ChangeLog: * d-builtins.cc (d_add_builtin_version): Remove all setting of target-specific global.params. * typeinfo.cc (create_typeinfo): Don't add argType fields to TypeInfo_Struct. --- gcc/d/d-builtins.cc | 19 ------------------- gcc/d/typeinfo.cc | 5 +---- 2 files changed, 1 insertion(+), 23 deletions(-) diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc index ce098617c62..400bce0a141 100644 --- a/gcc/d/d-builtins.cc +++ b/gcc/d/d-builtins.cc @@ -418,25 +418,6 @@ d_eval_constant_expression (const Loc &loc, tree cst) void d_add_builtin_version (const char* ident) { - /* For now, we need to tell the D frontend what platform is being targeted. - This should be removed once the frontend has been fixed. */ - if (strcmp (ident, "linux") == 0) - global.params.isLinux = true; - else if (strcmp (ident, "OSX") == 0) - global.params.isOSX = true; - else if (strcmp (ident, "Windows") == 0) - global.params.isWindows = true; - else if (strcmp (ident, "FreeBSD") == 0) - global.params.isFreeBSD = true; - else if (strcmp (ident, "OpenBSD") == 0) - global.params.isOpenBSD = true; - else if (strcmp (ident, "Solaris") == 0) - global.params.isSolaris = true; - /* The is64bit field only refers to x86_64 target. */ - else if (strcmp (ident, "X86_64") == 0) - global.params.is64bit = true; - /* No other fields are required to be set for the frontend. */ - VersionCondition::addPredefinedGlobalIdent (ident); } diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc index f8ffcbfff25..503480b491d 100644 --- a/gcc/d/typeinfo.cc +++ b/gcc/d/typeinfo.cc @@ -1562,9 +1562,6 @@ create_typeinfo (Type *type, Module *mod) case TK_STRUCT_TYPE: if (!tinfo_types[tk]) { - /* Some ABIs add extra TypeInfo fields on the end. */ - tree argtype = global.params.is64bit ? ptr_type_node : NULL_TREE; - ident = Identifier::idPool ("TypeInfo_Struct"); make_internal_typeinfo (tk, ident, array_type_node, array_type_node, @@ -1572,7 +1569,7 @@ create_typeinfo (Type *type, Module *mod) ptr_type_node, ptr_type_node, d_uint_type, ptr_type_node, ptr_type_node, d_uint_type, - ptr_type_node, argtype, argtype, NULL); + ptr_type_node, NULL); } t->vtinfo = TypeInfoStructDeclaration::create (t); break; -- 2.27.0