summaryrefslogtreecommitdiff
path: root/docs/BitCodeFormat.rst
diff options
context:
space:
mode:
Diffstat (limited to 'docs/BitCodeFormat.rst')
-rw-r--r--docs/BitCodeFormat.rst39
1 files changed, 30 insertions, 9 deletions
diff --git a/docs/BitCodeFormat.rst b/docs/BitCodeFormat.rst
index d6e3099bdb63d..ffa2176325275 100644
--- a/docs/BitCodeFormat.rst
+++ b/docs/BitCodeFormat.rst
@@ -467,10 +467,11 @@ Native Object File Wrapper Format
=================================
Bitcode files for LLVM IR may also be wrapped in a native object file
-(i.e. ELF, COFF, Mach-O). The bitcode must be stored in a section of the
-object file named ``.llvmbc``. This wrapper format is useful for accommodating
-LTO in compilation pipelines where intermediate objects must be native object
-files which contain metadata in other sections.
+(i.e. ELF, COFF, Mach-O). The bitcode must be stored in a section of the object
+file named ``__LLVM,__bitcode`` for MachO and ``.llvmbc`` for the other object
+formats. This wrapper format is useful for accommodating LTO in compilation
+pipelines where intermediate objects must be native object files which contain
+metadata in other sections.
Not all tools support this format.
@@ -689,6 +690,7 @@ global variable. The operand fields are:
.. _linkage type:
* *linkage*: An encoding of the linkage type for this variable:
+
* ``external``: code 0
* ``weak``: code 1
* ``appending``: code 2
@@ -713,20 +715,30 @@ global variable. The operand fields are:
.. _visibility:
* *visibility*: If present, an encoding of the visibility of this variable:
+
* ``default``: code 0
* ``hidden``: code 1
* ``protected``: code 2
+.. _bcthreadlocal:
+
* *threadlocal*: If present, an encoding of the thread local storage mode of the
variable:
+
* ``not thread local``: code 0
* ``thread local; default TLS model``: code 1
* ``localdynamic``: code 2
* ``initialexec``: code 3
* ``localexec``: code 4
-* *unnamed_addr*: If present and non-zero, indicates that the variable has
- ``unnamed_addr``
+.. _bcunnamedaddr:
+
+* *unnamed_addr*: If present, an encoding of the ``unnamed_addr`` attribute of this
+ variable:
+
+ * not ``unnamed_addr``: code 0
+ * ``unnamed_addr``: code 1
+ * ``local_unnamed_addr``: code 2
.. _bcdllstorageclass:
@@ -736,6 +748,8 @@ global variable. The operand fields are:
* ``dllimport``: code 1
* ``dllexport``: code 2
+* *comdat*: An encoding of the COMDAT of this function
+
.. _FUNCTION:
MODULE_CODE_FUNCTION Record
@@ -756,6 +770,7 @@ function. The operand fields are:
* ``anyregcc``: code 13
* ``preserve_mostcc``: code 14
* ``preserve_allcc``: code 15
+ * ``swiftcc`` : code 16
* ``cxx_fast_tlscc``: code 17
* ``x86_stdcallcc``: code 64
* ``x86_fastcallcc``: code 65
@@ -782,8 +797,8 @@ function. The operand fields are:
* *gc*: If present and nonzero, the 1-based garbage collector index in the table
of `MODULE_CODE_GCNAME`_ entries.
-* *unnamed_addr*: If present and non-zero, indicates that the function has
- ``unnamed_addr``
+* *unnamed_addr*: If present, an encoding of the
+ :ref:`unnamed_addr<bcunnamedaddr>` attribute of this function
* *prologuedata*: If non-zero, the value index of the prologue data for this function,
plus 1.
@@ -802,7 +817,7 @@ function. The operand fields are:
MODULE_CODE_ALIAS Record
^^^^^^^^^^^^^^^^^^^^^^^^
-``[ALIAS, alias type, aliasee val#, linkage, visibility, dllstorageclass]``
+``[ALIAS, alias type, aliasee val#, linkage, visibility, dllstorageclass, threadlocal, unnamed_addr]``
The ``ALIAS`` record (code 9) marks the definition of an alias. The operand
fields are
@@ -818,6 +833,12 @@ fields are
* *dllstorageclass*: If present, an encoding of the
:ref:`dllstorageclass<bcdllstorageclass>` of the alias
+* *threadlocal*: If present, an encoding of the
+ :ref:`thread local property<bcthreadlocal>` of the alias
+
+* *unnamed_addr*: If present, an encoding of the
+ :ref:`unnamed_addr<bcunnamedaddr>` attribute of this alias
+
MODULE_CODE_PURGEVALS Record
^^^^^^^^^^^^^^^^^^^^^^^^^^^^