public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-8174] d: Remove setting of target-specific global.params flags from front-end
@ 2021-04-14 12:44 Iain Buclaw
  0 siblings, 0 replies; only message in thread
From: Iain Buclaw @ 2021-04-14 12:44 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:a5e4abac26b815fe0b0d421930bfdfd2901adfe3

commit r11-8174-ga5e4abac26b815fe0b0d421930bfdfd2901adfe3
Author: Iain Buclaw <ibuclaw@gdcproject.org>
Date:   Wed Apr 14 12:19:54 2021 +0200

    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.

Diff:
---
 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;


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-14 12:44 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-14 12:44 [gcc r11-8174] d: Remove setting of target-specific global.params flags from front-end Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).