* Move enum tls_model to coretypes.h
@ 2004-07-29 15:11 Zack Weinberg
0 siblings, 0 replies; only message in thread
From: Zack Weinberg @ 2004-07-29 15:11 UTC (permalink / raw)
To: gcc-patches
SYMBOL_REF_TLS_MODEL (in rtl.h) returns a value of type enum
tls_model, which is defined in tree.h. So any file that uses
SYMBOL_REF_TLS_MODEL needs to include tree.h even if it has no
other reason to do so.
This doesn't come up very often (never in CVS; I found it while
working on something else), but enum tls_model is small and unlikely
to change often, so a reasonable fix is to move it to coretypes.h.
zw
* tree.h (enum tls_model): Move ...
* coretypes.h: ... here.
===================================================================
Index: coretypes.h
--- coretypes.h 28 Jan 2003 23:26:22 -0000 1.4
+++ coretypes.h 28 Jul 2004 23:35:10 -0000
@@ -50,6 +50,16 @@ typedef union tree_node *tree;
struct cpp_reader;
+/* The thread-local storage model associated with a given VAR_DECL
+ or SYMBOL_REF. This isn't used much, but both trees and RTL refer
+ to it, so it's here. */
+enum tls_model {
+ TLS_MODEL_GLOBAL_DYNAMIC = 1,
+ TLS_MODEL_LOCAL_DYNAMIC,
+ TLS_MODEL_INITIAL_EXEC,
+ TLS_MODEL_LOCAL_EXEC
+};
+
#else
struct _dont_use_rtx_here_;
===================================================================
Index: tree.h
--- tree.h 26 Jul 2004 16:28:51 -0000 1.576
+++ tree.h 28 Jul 2004 23:35:10 -0000
@@ -2571,13 +2571,6 @@ extern GTY(()) tree integer_types[itk_no
\f
/* Set to the default thread-local storage (tls) model to use. */
-enum tls_model {
- TLS_MODEL_GLOBAL_DYNAMIC = 1,
- TLS_MODEL_LOCAL_DYNAMIC,
- TLS_MODEL_INITIAL_EXEC,
- TLS_MODEL_LOCAL_EXEC
-};
-
extern enum tls_model flag_tls_default;
\f
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-07-28 23:36 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-07-29 15:11 Move enum tls_model to coretypes.h Zack Weinberg
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).