Commit 1c773c7a by Kai Tietz Committed by Kai Tietz

rtti.c (LONGPTR_T): New helper-macro.

        * rtti.c (LONGPTR_T): New helper-macro.
        (get_pseudo_ti_init): Initialize offset_type by LONGPTR_T
        type instead of 'long' type.
        (create_tinfo_types): Use for offset/flags field LONGPTR_T
        type instead of 'long' type.

From-SVN: r194745
parent 5fabac29
2012-12-28 Kai Tietz <ktietz@redhat.com>
* rtti.c (LONGPTR_T): New helper-macro.
(get_pseudo_ti_init): Initialize offset_type by LONGPTR_T
type instead of 'long' type.
(create_tinfo_types): Use for offset/flags field LONGPTR_T
type instead of 'long' type.
2012-12-19 Jason Merrill <jason@redhat.com> 2012-12-19 Jason Merrill <jason@redhat.com>
PR c++/55724 PR c++/55724
......
...@@ -89,6 +89,12 @@ typedef enum tinfo_kind ...@@ -89,6 +89,12 @@ typedef enum tinfo_kind
/* ... abi::__vmi_type_info<I> */ /* ... abi::__vmi_type_info<I> */
} tinfo_kind; } tinfo_kind;
/* Helper macro to get maximum scalar-width of pointer or of the 'long'-type.
This of interest for llp64 targets. */
#define LONGPTR_T \
integer_types[(POINTER_SIZE <= TYPE_PRECISION (integer_types[itk_long]) \
? itk_long : itk_long_long)]
/* A vector of all tinfo decls that haven't yet been emitted. */ /* A vector of all tinfo decls that haven't yet been emitted. */
vec<tree, va_gc> *unemitted_tinfo_decls; vec<tree, va_gc> *unemitted_tinfo_decls;
...@@ -1116,7 +1122,7 @@ get_pseudo_ti_init (tree type, unsigned tk_index) ...@@ -1116,7 +1122,7 @@ get_pseudo_ti_init (tree type, unsigned tk_index)
tree binfo = TYPE_BINFO (type); tree binfo = TYPE_BINFO (type);
int nbases = BINFO_N_BASE_BINFOS (binfo); int nbases = BINFO_N_BASE_BINFOS (binfo);
vec<tree, va_gc> *base_accesses = BINFO_BASE_ACCESSES (binfo); vec<tree, va_gc> *base_accesses = BINFO_BASE_ACCESSES (binfo);
tree offset_type = integer_types[itk_long]; tree offset_type = LONGPTR_T;
tree base_inits = NULL_TREE; tree base_inits = NULL_TREE;
int ix; int ix;
vec<constructor_elt, va_gc> *init_vec = NULL; vec<constructor_elt, va_gc> *init_vec = NULL;
...@@ -1420,7 +1426,7 @@ create_tinfo_types (void) ...@@ -1420,7 +1426,7 @@ create_tinfo_types (void)
fields = field; fields = field;
field = build_decl (BUILTINS_LOCATION, field = build_decl (BUILTINS_LOCATION,
FIELD_DECL, NULL_TREE, integer_types[itk_long]); FIELD_DECL, NULL_TREE, LONGPTR_T);
DECL_CHAIN (field) = fields; DECL_CHAIN (field) = fields;
fields = field; fields = field;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment