summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandre Oliva <aoliva@redhat.com>2015-11-06 03:43:52 -0200
committerAlexandre Oliva <aoliva@redhat.com>2016-02-19 19:55:12 -0200
commit05d63393586bc55afd494627df48b07adf77cce1 (patch)
tree3750228c6cc0f5a3266b098290a28fd3635f5304
parentd2aedb0df36037338fec0ce0fb8202f305287e00 (diff)
downloadgcc-05d63393586bc55afd494627df48b07adf77cce1.tar.gz
unbreak typedefs
-rw-r--r--libcc1/libcp1plugin.cc42
1 files changed, 22 insertions, 20 deletions
diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
index f063c549657..85b453d18d2 100644
--- a/libcc1/libcp1plugin.cc
+++ b/libcc1/libcp1plugin.cc
@@ -787,32 +787,34 @@ plugin_new_decl (cc1_plugin::connection *self,
{
decl = build_lang_decl_loc (loc, code, identifier, sym_type);
- gcc_assert (TREE_CODE (decl) == VAR_DECL);
-
- // FIXME: sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE
- gcc_assert (!(sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE));
-
- if (sym_flags & GCC_CP_FLAG_CONSTEXPR_VARIABLE)
- DECL_DECLARED_CONSTEXPR_P (decl) = true;
-
- DECL_THIS_STATIC (decl) = 1;
- // The remainder of this block does the same as:
- // set_linkage_for_static_data_member (decl);
- TREE_PUBLIC (decl) = 1;
- TREE_STATIC (decl) = 1;
- DECL_INTERFACE_KNOWN (decl) = 1;
+ if (TREE_CODE (decl) == VAR_DECL)
+ {
+ DECL_THIS_STATIC (decl) = 1;
+ // The remainder of this block does the same as:
+ // set_linkage_for_static_data_member (decl);
+ TREE_PUBLIC (decl) = 1;
+ TREE_STATIC (decl) = 1;
+ DECL_INTERFACE_KNOWN (decl) = 1;
+
+ // FIXME: sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE
+ gcc_assert (!(sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE));
+
+ if (sym_flags & GCC_CP_FLAG_CONSTEXPR_VARIABLE)
+ DECL_DECLARED_CONSTEXPR_P (decl) = true;
+ }
}
else
{
decl = build_decl (loc, code, identifier, sym_type);
- gcc_assert (TREE_CODE (decl) == VAR_DECL);
-
- // FIXME: sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE
- gcc_assert (!(sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE));
+ if (TREE_CODE (decl) == VAR_DECL)
+ {
+ // FIXME: sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE
+ gcc_assert (!(sym_flags & GCC_CP_FLAG_THREAD_LOCAL_VARIABLE));
- if (sym_flags & GCC_CP_FLAG_CONSTEXPR_VARIABLE)
- DECL_DECLARED_CONSTEXPR_P (decl) = true;
+ if (sym_flags & GCC_CP_FLAG_CONSTEXPR_VARIABLE)
+ DECL_DECLARED_CONSTEXPR_P (decl) = true;
+ }
}
TREE_USED (decl) = 1;
TREE_ADDRESSABLE (decl) = 1;