Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

194 lines
10KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <html>
  3. <!-- Copyright (C) 1988-2020 Free Software Foundation, Inc.
  4. Permission is granted to copy, distribute and/or modify this document
  5. under the terms of the GNU Free Documentation License, Version 1.3 or
  6. any later version published by the Free Software Foundation; with the
  7. Invariant Sections being "Funding Free Software", the Front-Cover
  8. Texts being (a) (see below), and with the Back-Cover Texts being (b)
  9. (see below). A copy of the license is included in the section entitled
  10. "GNU Free Documentation License".
  11. (a) The FSF's Front-Cover Text is:
  12. A GNU Manual
  13. (b) The FSF's Back-Cover Text is:
  14. You have freedom to copy and modify this GNU Manual, like GNU
  15. software. Copies published by the Free Software Foundation raise
  16. funds for GNU development. -->
  17. <!-- Created by GNU Texinfo 6.5, http://www.gnu.org/software/texinfo/ -->
  18. <head>
  19. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  20. <title>C++ ABI (GNU Compiler Collection (GCC) Internals)</title>
  21. <meta name="description" content="C++ ABI (GNU Compiler Collection (GCC) Internals)">
  22. <meta name="keywords" content="C++ ABI (GNU Compiler Collection (GCC) Internals)">
  23. <meta name="resource-type" content="document">
  24. <meta name="distribution" content="global">
  25. <meta name="Generator" content="makeinfo">
  26. <link href="index.html#Top" rel="start" title="Top">
  27. <link href="Option-Index.html#Option-Index" rel="index" title="Option Index">
  28. <link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
  29. <link href="Target-Macros.html#Target-Macros" rel="up" title="Target Macros">
  30. <link href="D-Language-and-ABI.html#D-Language-and-ABI" rel="next" title="D Language and ABI">
  31. <link href="PCH-Target.html#PCH-Target" rel="prev" title="PCH Target">
  32. <style type="text/css">
  33. <!--
  34. a.summary-letter {text-decoration: none}
  35. blockquote.indentedblock {margin-right: 0em}
  36. blockquote.smallindentedblock {margin-right: 0em; font-size: smaller}
  37. blockquote.smallquotation {font-size: smaller}
  38. div.display {margin-left: 3.2em}
  39. div.example {margin-left: 3.2em}
  40. div.lisp {margin-left: 3.2em}
  41. div.smalldisplay {margin-left: 3.2em}
  42. div.smallexample {margin-left: 3.2em}
  43. div.smalllisp {margin-left: 3.2em}
  44. kbd {font-style: oblique}
  45. pre.display {font-family: inherit}
  46. pre.format {font-family: inherit}
  47. pre.menu-comment {font-family: serif}
  48. pre.menu-preformatted {font-family: serif}
  49. pre.smalldisplay {font-family: inherit; font-size: smaller}
  50. pre.smallexample {font-size: smaller}
  51. pre.smallformat {font-family: inherit; font-size: smaller}
  52. pre.smalllisp {font-size: smaller}
  53. span.nolinebreak {white-space: nowrap}
  54. span.roman {font-family: initial; font-weight: normal}
  55. span.sansserif {font-family: sans-serif; font-weight: normal}
  56. ul.no-bullet {list-style: none}
  57. -->
  58. </style>
  59. </head>
  60. <body lang="en">
  61. <a name="C_002b_002b-ABI"></a>
  62. <div class="header">
  63. <p>
  64. Next: <a href="D-Language-and-ABI.html#D-Language-and-ABI" accesskey="n" rel="next">D Language and ABI</a>, Previous: <a href="PCH-Target.html#PCH-Target" accesskey="p" rel="prev">PCH Target</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  65. </div>
  66. <hr>
  67. <a name="C_002b_002b-ABI-parameters"></a>
  68. <h3 class="section">18.28 C++ ABI parameters</h3>
  69. <a name="index-parameters_002c-c_002b_002b-abi"></a>
  70. <dl>
  71. <dt><a name="index-TARGET_005fCXX_005fGUARD_005fTYPE"></a>Target Hook: <em>tree</em> <strong>TARGET_CXX_GUARD_TYPE</strong> <em>(void)</em></dt>
  72. <dd><p>Define this hook to override the integer type used for guard variables.
  73. These are used to implement one-time construction of static objects. The
  74. default is long_long_integer_type_node.
  75. </p></dd></dl>
  76. <dl>
  77. <dt><a name="index-TARGET_005fCXX_005fGUARD_005fMASK_005fBIT"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_GUARD_MASK_BIT</strong> <em>(void)</em></dt>
  78. <dd><p>This hook determines how guard variables are used. It should return
  79. <code>false</code> (the default) if the first byte should be used. A return value of
  80. <code>true</code> indicates that only the least significant bit should be used.
  81. </p></dd></dl>
  82. <dl>
  83. <dt><a name="index-TARGET_005fCXX_005fGET_005fCOOKIE_005fSIZE"></a>Target Hook: <em>tree</em> <strong>TARGET_CXX_GET_COOKIE_SIZE</strong> <em>(tree <var>type</var>)</em></dt>
  84. <dd><p>This hook returns the size of the cookie to use when allocating an array
  85. whose elements have the indicated <var>type</var>. Assumes that it is already
  86. known that a cookie is needed. The default is
  87. <code>max(sizeof (size_t), alignof(type))</code>, as defined in section 2.7 of the
  88. IA64/Generic C++ ABI.
  89. </p></dd></dl>
  90. <dl>
  91. <dt><a name="index-TARGET_005fCXX_005fCOOKIE_005fHAS_005fSIZE"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_COOKIE_HAS_SIZE</strong> <em>(void)</em></dt>
  92. <dd><p>This hook should return <code>true</code> if the element size should be stored in
  93. array cookies. The default is to return <code>false</code>.
  94. </p></dd></dl>
  95. <dl>
  96. <dt><a name="index-TARGET_005fCXX_005fIMPORT_005fEXPORT_005fCLASS"></a>Target Hook: <em>int</em> <strong>TARGET_CXX_IMPORT_EXPORT_CLASS</strong> <em>(tree <var>type</var>, int <var>import_export</var>)</em></dt>
  97. <dd><p>If defined by a backend this hook allows the decision made to export
  98. class <var>type</var> to be overruled. Upon entry <var>import_export</var>
  99. will contain 1 if the class is going to be exported, -1 if it is going
  100. to be imported and 0 otherwise. This function should return the
  101. modified value and perform any other actions necessary to support the
  102. backend&rsquo;s targeted operating system.
  103. </p></dd></dl>
  104. <dl>
  105. <dt><a name="index-TARGET_005fCXX_005fCDTOR_005fRETURNS_005fTHIS"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_CDTOR_RETURNS_THIS</strong> <em>(void)</em></dt>
  106. <dd><p>This hook should return <code>true</code> if constructors and destructors return
  107. the address of the object created/destroyed. The default is to return
  108. <code>false</code>.
  109. </p></dd></dl>
  110. <dl>
  111. <dt><a name="index-TARGET_005fCXX_005fKEY_005fMETHOD_005fMAY_005fBE_005fINLINE"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_KEY_METHOD_MAY_BE_INLINE</strong> <em>(void)</em></dt>
  112. <dd><p>This hook returns true if the key method for a class (i.e., the method
  113. which, if defined in the current translation unit, causes the virtual
  114. table to be emitted) may be an inline function. Under the standard
  115. Itanium C++ ABI the key method may be an inline function so long as
  116. the function is not declared inline in the class definition. Under
  117. some variants of the ABI, an inline function can never be the key
  118. method. The default is to return <code>true</code>.
  119. </p></dd></dl>
  120. <dl>
  121. <dt><a name="index-TARGET_005fCXX_005fDETERMINE_005fCLASS_005fDATA_005fVISIBILITY"></a>Target Hook: <em>void</em> <strong>TARGET_CXX_DETERMINE_CLASS_DATA_VISIBILITY</strong> <em>(tree <var>decl</var>)</em></dt>
  122. <dd><p><var>decl</var> is a virtual table, virtual table table, typeinfo object, or other similar implicit class data object that will be emitted with external linkage in this translation unit. No ELF visibility has been explicitly specified. If the target needs to specify a visibility other than that of the containing class, use this hook to set <code>DECL_VISIBILITY</code> and <code>DECL_VISIBILITY_SPECIFIED</code>.
  123. </p></dd></dl>
  124. <dl>
  125. <dt><a name="index-TARGET_005fCXX_005fCLASS_005fDATA_005fALWAYS_005fCOMDAT"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_CLASS_DATA_ALWAYS_COMDAT</strong> <em>(void)</em></dt>
  126. <dd><p>This hook returns true (the default) if virtual tables and other
  127. similar implicit class data objects are always COMDAT if they have
  128. external linkage. If this hook returns false, then class data for
  129. classes whose virtual table will be emitted in only one translation
  130. unit will not be COMDAT.
  131. </p></dd></dl>
  132. <dl>
  133. <dt><a name="index-TARGET_005fCXX_005fLIBRARY_005fRTTI_005fCOMDAT"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_LIBRARY_RTTI_COMDAT</strong> <em>(void)</em></dt>
  134. <dd><p>This hook returns true (the default) if the RTTI information for
  135. the basic types which is defined in the C++ runtime should always
  136. be COMDAT, false if it should not be COMDAT.
  137. </p></dd></dl>
  138. <dl>
  139. <dt><a name="index-TARGET_005fCXX_005fUSE_005fAEABI_005fATEXIT"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_USE_AEABI_ATEXIT</strong> <em>(void)</em></dt>
  140. <dd><p>This hook returns true if <code>__aeabi_atexit</code> (as defined by the ARM EABI)
  141. should be used to register static destructors when <samp>-fuse-cxa-atexit</samp>
  142. is in effect. The default is to return false to use <code>__cxa_atexit</code>.
  143. </p></dd></dl>
  144. <dl>
  145. <dt><a name="index-TARGET_005fCXX_005fUSE_005fATEXIT_005fFOR_005fCXA_005fATEXIT"></a>Target Hook: <em>bool</em> <strong>TARGET_CXX_USE_ATEXIT_FOR_CXA_ATEXIT</strong> <em>(void)</em></dt>
  146. <dd><p>This hook returns true if the target <code>atexit</code> function can be used
  147. in the same manner as <code>__cxa_atexit</code> to register C++ static
  148. destructors. This requires that <code>atexit</code>-registered functions in
  149. shared libraries are run in the correct order when the libraries are
  150. unloaded. The default is to return false.
  151. </p></dd></dl>
  152. <dl>
  153. <dt><a name="index-TARGET_005fCXX_005fADJUST_005fCLASS_005fAT_005fDEFINITION"></a>Target Hook: <em>void</em> <strong>TARGET_CXX_ADJUST_CLASS_AT_DEFINITION</strong> <em>(tree <var>type</var>)</em></dt>
  154. <dd><p><var>type</var> is a C++ class (i.e., RECORD_TYPE or UNION_TYPE) that has just been defined. Use this hook to make adjustments to the class (eg, tweak visibility or perform any other required target modifications).
  155. </p></dd></dl>
  156. <dl>
  157. <dt><a name="index-TARGET_005fCXX_005fDECL_005fMANGLING_005fCONTEXT"></a>Target Hook: <em>tree</em> <strong>TARGET_CXX_DECL_MANGLING_CONTEXT</strong> <em>(const_tree <var>decl</var>)</em></dt>
  158. <dd><p>Return target-specific mangling context of <var>decl</var> or <code>NULL_TREE</code>.
  159. </p></dd></dl>
  160. <hr>
  161. <div class="header">
  162. <p>
  163. Next: <a href="D-Language-and-ABI.html#D-Language-and-ABI" accesskey="n" rel="next">D Language and ABI</a>, Previous: <a href="PCH-Target.html#PCH-Target" accesskey="p" rel="prev">PCH Target</a>, Up: <a href="Target-Macros.html#Target-Macros" accesskey="u" rel="up">Target Macros</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html#Option-Index" title="Index" rel="index">Index</a>]</p>
  164. </div>
  165. </body>
  166. </html>