tree_contains_struct[CONST_DECL][TS_CONST_DECL] = 1;
tree_contains_struct[TYPE_DECL][TS_TYPE_DECL] = 1;
tree_contains_struct[FUNCTION_DECL][TS_FUNCTION_DECL] = 1;
+ tree_contains_struct[IMPORTED_DECL][TS_DECL_MINIMAL] = 1;
+ tree_contains_struct[IMPORTED_DECL][TS_DECL_COMMON] = 1;
lang_hooks.init_ts ();
}
|| CONTAINS_PLACEHOLDER_P (TREE_OPERAND (exp, 1))
|| CONTAINS_PLACEHOLDER_P (TREE_OPERAND (exp, 2)));
+ case SAVE_EXPR:
+ /* The save_expr function never wraps anything containing
+ a PLACEHOLDER_EXPR. */
+ return 0;
+
default:
break;
}
void protected_set_expr_location (tree t, location_t loc)
{
- if (t && t != error_mark_node && CAN_HAVE_LOCATION_P (t))
+ if (t && CAN_HAVE_LOCATION_P (t))
SET_EXPR_LOCATION (t, loc);
}
\f
TYPE_ARG_TYPES (new_type) = new_reversed;
}
else
- new_type = build_function_type (TREE_TYPE (orig_type), new_reversed);
+ {
+ new_type
+ = build_distinct_type_copy (build_function_type (TREE_TYPE (orig_type),
+ new_reversed));
+ TYPE_CONTEXT (new_type) = TYPE_CONTEXT (orig_type);
+ }
/* This is a new type, not a copy of an old type. Need to reassociate
variants. We can handle everything except the main variant lazily. */
new_type = TREE_TYPE (orig_decl);
if (prototype_p (new_type))
new_type = build_function_type_skip_args (new_type, args_to_skip);
- TREE_TYPE (orig_decl) = new_type;
+ TREE_TYPE (new_decl) = new_type;
+
+ /* For declarations setting DECL_VINDEX (i.e. methods)
+ we expect first argument to be THIS pointer. */
+ if (bitmap_bit_p (args_to_skip, 0))
+ DECL_VINDEX (new_decl) = NULL_TREE;
return new_decl;
}
&& TREE_CODE (TREE_OPERAND (addr, 0)) == FUNCTION_DECL)
return TREE_OPERAND (addr, 0);
- /* We couldn't figure out what was being called. Maybe the front
- end has some idea. */
- return lang_hooks.lang_get_callee_fndecl (call);
+ /* We couldn't figure out what was being called. */
+ return NULL_TREE;
}
/* Print debugging information about tree nodes generated during the compile,