aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2005-07-21 08:08:17 +0000
committerNick Clifton <nickc@gcc.gnu.org>2005-07-21 08:08:17 +0000
commit889d84651c1630468bcc810551c26753acd24782 (patch)
treeb0a943f255bfc663c961a8a69df677a471d9b3ad /gcc
parent8eb9df78b19968f4b0b4bae40d3f9b58749eddbe (diff)
downloadgcc-889d84651c1630468bcc810551c26753acd24782.zip
gcc-889d84651c1630468bcc810551c26753acd24782.tar.gz
gcc-889d84651c1630468bcc810551c26753acd24782.tar.bz2
Replace C++ style line comments with C style line comments.
(symbian_add_attribute): Do not use a ? operator on the LHS of an assignment. (sh_symbian_handle_dll_attribute): Change the type of the method vector to "VEC(tree,gc)*" and use vector accessor macros to walk over the elements. (symbian_export_vtable_and_rtti_p): Likewise. (symbian_class_needs_attribute_p): Likewise. From-SVN: r102228
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog12
-rw-r--r--gcc/config/sh/symbian.c41
2 files changed, 36 insertions, 17 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3be68a7..e79da09 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,15 @@
+2005-07-21 Nick Clifton <nickc@redhat.com>
+
+ * config/sh/symbian.c: Replace C++ style line comments with C
+ style line comments.
+ (symbian_add_attribute): Do not use a ? operator on the LHS of
+ an assignment.
+ (sh_symbian_handle_dll_attribute): Change the type of the
+ method vector to "VEC(tree,gc)*" and use vector accessor
+ macros to walk over the elements.
+ (symbian_export_vtable_and_rtti_p): Likewise.
+ (symbian_class_needs_attribute_p): Likewise.
+
2005-07-21 Paolo Bonzini <bonzini@gnu.org>
PR target/22085
diff --git a/gcc/config/sh/symbian.c b/gcc/config/sh/symbian.c
index 456c23c..8568f32 100644
--- a/gcc/config/sh/symbian.c
+++ b/gcc/config/sh/symbian.c
@@ -38,8 +38,8 @@
1 for informative messages about decisions to add attributes
2 for verbose information about what is being done. */
#define SYMBIAN_DEBUG 0
-//#define SYMBIAN_DEBUG 1
-//#define SYMBIAN_DEBUG 2
+/* #define SYMBIAN_DEBUG 1 */
+/* #define SYMBIAN_DEBUG 2 */
/* A unique character to encode declspec encoded objects. */
#define SH_SYMBIAN_FLAG_CHAR "$"
@@ -375,8 +375,10 @@ symbian_add_attribute (tree node, const char *attr_name)
attr = get_identifier (attr_name);
- (DECL_P (node) ? DECL_ATTRIBUTES (node) : TYPE_ATTRIBUTES (node))
- = tree_cons (attr, NULL_TREE, attrs);
+ if (DECL_P (node))
+ DECL_ATTRIBUTES (node) = tree_cons (attr, NULL_TREE, attrs);
+ else
+ TYPE_ATTRIBUTES (node) = tree_cons (attr, NULL_TREE, attrs);
#if SYMBIAN_DEBUG
fprintf (stderr, "propogate %s attribute", attr_name);
@@ -549,18 +551,18 @@ sh_symbian_handle_dll_attribute (tree *pnode, tree name, tree args,
static void
symbian_possibly_export_base_class (tree base_class)
{
- tree methods;
+ VEC(tree,gc) *method_vec;
int len;
if (! (TYPE_CONTAINS_VPTR_P (base_class)))
return;
- methods = CLASSTYPE_METHOD_VEC (base_class);
- len = methods ? TREE_VEC_LENGTH (methods) : 0;
+ method_vec = CLASSTYPE_METHOD_VEC (base_class);
+ len = method_vec ? VEC_length (tree, method_vec) : 0;
for (;len --;)
{
- tree member = TREE_VEC_ELT (methods, len);
+ tree member = VEC_index (tree, method_vec, len);
if (! member)
continue;
@@ -611,7 +613,7 @@ symbian_export_vtable_and_rtti_p (tree ctype)
bool dllimport_ctor_dtor;
bool dllimport_member;
tree binfo, base_binfo;
- tree methods;
+ VEC(tree,gc) *method_vec;
tree key;
int i;
int len;
@@ -653,12 +655,12 @@ symbian_export_vtable_and_rtti_p (tree ctype)
dllimport_ctor_dtor = false;
dllimport_member = false;
- methods = CLASSTYPE_METHOD_VEC (ctype);
- len = methods ? TREE_VEC_LENGTH (methods) : 0;
+ method_vec = CLASSTYPE_METHOD_VEC (ctype);
+ len = method_vec ? VEC_length (tree, method_vec) : 0;
for (;len --;)
{
- tree member = TREE_VEC_ELT (methods, len);
+ tree member = VEC_index (tree, method_vec, len);
if (! member)
continue;
@@ -754,22 +756,27 @@ symbian_add_attribute_to_class_vtable_and_rtti (tree ctype, const char *attr_nam
static bool
symbian_class_needs_attribute_p (tree ctype, const char *attribute_name)
{
+ VEC(tree,gc) *method_vec;
+
+ method_vec = CLASSTYPE_METHOD_VEC (ctype);
+
/* If the key function has the attribute then the class needs it too. */
if (TYPE_POLYMORPHIC_P (ctype)
- && CLASSTYPE_KEY_METHOD (ctype)
+ && method_vec
&& lookup_attribute (attribute_name,
- DECL_ATTRIBUTES (CLASSTYPE_KEY_METHOD (ctype))))
+ DECL_ATTRIBUTES (VEC_index (tree, method_vec, 0))))
return true;
/* Check the class's member functions. */
if (TREE_CODE (ctype) == RECORD_TYPE)
{
- tree methods = CLASSTYPE_METHOD_VEC (ctype);
- unsigned int len = methods ? TREE_VEC_LENGTH (methods) : 0;
+ unsigned int len;
+
+ len = method_vec ? VEC_length (tree, method_vec) : 0;
for (;len --;)
{
- tree member = TREE_VEC_ELT (methods, len);
+ tree member = VEC_index (tree, method_vec, len);
if (! member)
continue;