diff options
author | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-14 12:19:54 +0200 |
---|---|---|
committer | Iain Buclaw <ibuclaw@gdcproject.org> | 2021-04-14 14:43:38 +0200 |
commit | a5e4abac26b815fe0b0d421930bfdfd2901adfe3 (patch) | |
tree | c72316568a3ddbdf54cd09df14b10dad5534a317 | |
parent | 5b63eb17d863ac080cf3c7df08233054b09d3747 (diff) | |
download | gcc-a5e4abac26b815fe0b0d421930bfdfd2901adfe3.zip gcc-a5e4abac26b815fe0b0d421930bfdfd2901adfe3.tar.gz gcc-a5e4abac26b815fe0b0d421930bfdfd2901adfe3.tar.bz2 |
d: Remove setting of target-specific global.params flags from front-end
Now that all dependencies on these flags have been removed, there's no
need to test and set them.
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.
-rw-r--r-- | gcc/d/d-builtins.cc | 19 | ||||
-rw-r--r-- | gcc/d/typeinfo.cc | 5 |
2 files changed, 1 insertions, 23 deletions
diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc index ce09861..400bce0 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 f8ffcbf..503480b 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; |