Deleted Added
full compact
rtti.c (52284) rtti.c (60967)
1/* RunTime Type Identification
2 Copyright (C) 1995, 96-97, 1998, 1999 Free Software Foundation, Inc.
3 Mostly written by Jason Merrill (jason@cygnus.com).
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 349 unchanged lines hidden (view full) ---

358 pushdecl_top_level (tdecl);
359 cp_finish_decl (tdecl, NULL_TREE, NULL_TREE, 0, 0);
360
361 pop_obstacks ();
362
363 return tdecl;
364}
365
1/* RunTime Type Identification
2 Copyright (C) 1995, 96-97, 1998, 1999 Free Software Foundation, Inc.
3 Mostly written by Jason Merrill (jason@cygnus.com).
4
5This file is part of GNU CC.
6
7GNU CC is free software; you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by

--- 349 unchanged lines hidden (view full) ---

358 pushdecl_top_level (tdecl);
359 cp_finish_decl (tdecl, NULL_TREE, NULL_TREE, 0, 0);
360
361 pop_obstacks ();
362
363 return tdecl;
364}
365
366/* Returns the decl for a function which will return a type_info node for
367 TYPE. This version does not mark the function used, for use in
368 set_rtti_entry; for the vtable case, we'll get marked in
369 finish_vtable_vardecl, when we know that we want to be emitted.
370
371 We do this to avoid emitting the tinfo node itself, since we don't
372 currently support DECL_DEFER_OUTPUT for variables. Also, we don't
373 associate constant pools with their functions properly, so we would
374 emit string constants and such even though we don't emit the actual
375 function. When those bugs are fixed, this function should go away. */
376
366tree
377tree
367get_tinfo_fn (type)
378get_tinfo_fn_unused (type)
368 tree type;
369{
370 tree name;
371 tree d;
372
373 if (TREE_CODE (type) == OFFSET_TYPE)
374 type = TREE_TYPE (type);
375 if (TREE_CODE (type) == METHOD_TYPE)

--- 12 unchanged lines hidden (view full) ---

388 TREE_PUBLIC (d) = 1;
389 DECL_ARTIFICIAL (d) = 1;
390 DECL_NOT_REALLY_EXTERN (d) = 1;
391 SET_DECL_TINFO_FN_P (d);
392 TREE_TYPE (name) = copy_to_permanent (type);
393
394 pushdecl_top_level (d);
395 make_function_rtl (d);
379 tree type;
380{
381 tree name;
382 tree d;
383
384 if (TREE_CODE (type) == OFFSET_TYPE)
385 type = TREE_TYPE (type);
386 if (TREE_CODE (type) == METHOD_TYPE)

--- 12 unchanged lines hidden (view full) ---

399 TREE_PUBLIC (d) = 1;
400 DECL_ARTIFICIAL (d) = 1;
401 DECL_NOT_REALLY_EXTERN (d) = 1;
402 SET_DECL_TINFO_FN_P (d);
403 TREE_TYPE (name) = copy_to_permanent (type);
404
405 pushdecl_top_level (d);
406 make_function_rtl (d);
396 mark_used (d);
397 mark_inline_for_output (d);
398 pop_obstacks ();
399
400 return d;
401}
402
407 mark_inline_for_output (d);
408 pop_obstacks ();
409
410 return d;
411}
412
413/* Likewise, but also mark it used. Called by various EH and RTTI code. */
414
403tree
415tree
416get_tinfo_fn (type)
417 tree type;
418{
419 tree d = get_tinfo_fn_unused (type);
420 mark_used (d);
421 return d;
422}
423
424tree
404get_typeid_1 (type)
405 tree type;
406{
407 tree t;
408
409 t = build_call
410 (get_tinfo_fn (type), TREE_TYPE (tinfo_fn_type), NULL_TREE);
411 return convert_from_reference (t);

--- 771 unchanged lines hidden ---
425get_typeid_1 (type)
426 tree type;
427{
428 tree t;
429
430 t = build_call
431 (get_tinfo_fn (type), TREE_TYPE (tinfo_fn_type), NULL_TREE);
432 return convert_from_reference (t);

--- 771 unchanged lines hidden ---