rtti.c (256281) | rtti.c (259947) |
---|---|
1/* RunTime Type Identification 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 2005, 2006 4 Free Software Foundation, Inc. 5 Mostly written by Jason Merrill (jason@cygnus.com). 6 7This file is part of GCC. 8 --- 18 unchanged lines hidden (view full) --- 27#include "tm.h" 28#include "tree.h" 29#include "cp-tree.h" 30#include "flags.h" 31#include "output.h" 32#include "assert.h" 33#include "toplev.h" 34#include "convert.h" | 1/* RunTime Type Identification 2 Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 3 2005, 2006 4 Free Software Foundation, Inc. 5 Mostly written by Jason Merrill (jason@cygnus.com). 6 7This file is part of GCC. 8 --- 18 unchanged lines hidden (view full) --- 27#include "tm.h" 28#include "tree.h" 29#include "cp-tree.h" 30#include "flags.h" 31#include "output.h" 32#include "assert.h" 33#include "toplev.h" 34#include "convert.h" |
35#include "target.h" |
|
35 36/* C++ returns type information to the user in struct type_info 37 objects. We also use type information to implement dynamic_cast and 38 exception handlers. Type information for a particular type is 39 indicated with an ABI defined structure derived from type_info. 40 This would all be very straight forward, but for the fact that the 41 runtime library provides the definitions of the type_info structure 42 and the ABI defined derived classes. We cannot build declarations --- 1379 unchanged lines hidden (view full) --- 1422 TREE_USED (tinfo) = 1; 1423 mark_needed (tinfo); 1424 /* The C++ ABI requires that these objects be COMDAT. But, 1425 On systems without weak symbols, initialized COMDAT 1426 objects are emitted with internal linkage. (See 1427 comdat_linkage for details.) Since we want these objects 1428 to have external linkage so that copies do not have to be 1429 emitted in code outside the runtime library, we make them | 36 37/* C++ returns type information to the user in struct type_info 38 objects. We also use type information to implement dynamic_cast and 39 exception handlers. Type information for a particular type is 40 indicated with an ABI defined structure derived from type_info. 41 This would all be very straight forward, but for the fact that the 42 runtime library provides the definitions of the type_info structure 43 and the ABI defined derived classes. We cannot build declarations --- 1379 unchanged lines hidden (view full) --- 1423 TREE_USED (tinfo) = 1; 1424 mark_needed (tinfo); 1425 /* The C++ ABI requires that these objects be COMDAT. But, 1426 On systems without weak symbols, initialized COMDAT 1427 objects are emitted with internal linkage. (See 1428 comdat_linkage for details.) Since we want these objects 1429 to have external linkage so that copies do not have to be 1430 emitted in code outside the runtime library, we make them |
1430 non-COMDAT here. */ 1431 if (!flag_weak) | 1431 non-COMDAT here. 1432 1433 It might also not be necessary to follow this detail of the 1434 ABI. */ 1435 if (!flag_weak || ! targetm.cxx.library_rtti_comdat ()) |
1432 { 1433 gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo)); 1434 DECL_INTERFACE_KNOWN (tinfo) = 1; 1435 } 1436 } 1437 } 1438} 1439 --- 55 unchanged lines hidden --- | 1436 { 1437 gcc_assert (TREE_PUBLIC (tinfo) && !DECL_COMDAT (tinfo)); 1438 DECL_INTERFACE_KNOWN (tinfo) = 1; 1439 } 1440 } 1441 } 1442} 1443 --- 55 unchanged lines hidden --- |