[llvm] a45bcde - [LangRef] Reorder two paragraphs for comdat
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 25 12:53:20 PDT 2021
Author: Fangrui Song
Date: 2021-07-25T12:53:14-07:00
New Revision: a45bcde05f0911d943c5ee5d6ef1327a0cc39dbc
URL: https://github.com/llvm/llvm-project/commit/a45bcde05f0911d943c5ee5d6ef1327a0cc39dbc
DIFF: https://github.com/llvm/llvm-project/commit/a45bcde05f0911d943c5ee5d6ef1327a0cc39dbc.diff
LOG: [LangRef] Reorder two paragraphs for comdat
so that IMAGE_COMDAT_SELECT_LARGEST refers to the correct example.
Added:
Modified:
llvm/docs/LangRef.rst
Removed:
################################################################################
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index beeffeb2e81df..9784f0c9067c5 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -965,6 +965,12 @@ the COMDAT key's section is the largest:
ret void
}
+In a COFF object file, this will create a COMDAT section with selection kind
+``IMAGE_COMDAT_SELECT_LARGEST`` containing the contents of the ``@foo`` symbol
+and another COMDAT section with selection kind
+``IMAGE_COMDAT_SELECT_ASSOCIATIVE`` which is associated with the first COMDAT
+section and contains the contents of the ``@bar`` symbol.
+
As a syntactic sugar the ``$name`` can be omitted if the name is the same as
the global name:
@@ -974,12 +980,6 @@ the global name:
@foo = global i32 2, comdat
@bar = global i32 3, comdat($foo)
-In a COFF object file, this will create a COMDAT section with selection kind
-``IMAGE_COMDAT_SELECT_LARGEST`` containing the contents of the ``@foo`` symbol
-and another COMDAT section with selection kind
-``IMAGE_COMDAT_SELECT_ASSOCIATIVE`` which is associated with the first COMDAT
-section and contains the contents of the ``@bar`` symbol.
-
There are some restrictions on the properties of the global object.
It, or an alias to it, must have the same name as the COMDAT group when
targeting COFF.
More information about the llvm-commits
mailing list