summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/AttrDocs.td
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2019-02-12 12:26:10 +0000
committerHans Wennborg <hans@hanshq.net>2019-02-12 12:26:10 +0000
commit8ffe5246a3a29bb151f1ad261a5d342f5d328eff (patch)
treeb9403a548f42f89fd62eade2f583d20514249fb3 /include/clang/Basic/AttrDocs.td
parent0781e7b214e66cdd5938a8d50b90a5c561d8e349 (diff)
[WebAssembly] Backport custom import name changes for clang to 8.0.
Specifically, this backports r352106, r352108, r352930, and r352936 to the 8.0 branch. The trunk patches don't apply cleanly to 8.0 due to some contemporaneous mass-rename and mass-clang-tidy patches, so this merges them to simplify rebasing. r352106 [WebAssembly] Add an import_module function attribute r352108 [WebAssembly] Add WebAssemblyImportModule to pragma-attribute-supported-attributes-list.test r352930 [WebAssembly] Add an import_field function attribute r352936 [WebAssembly] Fix ImportName's position in this test. By Dan Gohman! git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_80@353834 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/AttrDocs.td')
-rw-r--r--include/clang/Basic/AttrDocs.td35
1 files changed, 34 insertions, 1 deletions
diff --git a/include/clang/Basic/AttrDocs.td b/include/clang/Basic/AttrDocs.td
index 5773a92c9c..94c8343d23 100644
--- a/include/clang/Basic/AttrDocs.td
+++ b/include/clang/Basic/AttrDocs.td
@@ -3652,7 +3652,40 @@ definition (
For more information see
`gcc documentation <https://gcc.gnu.org/onlinedocs/gcc-7.2.0/gcc/Microsoft-Windows-Variable-Attributes.html>`_
or `msvc documentation <https://docs.microsoft.com/pl-pl/cpp/cpp/selectany>`_.
-}];
+}]; }
+
+def WebAssemblyImportModuleDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Clang supports the ``__attribute__((import_module(<module_name>)))``
+attribute for the WebAssembly target. This attribute may be attached to a
+function declaration, where it modifies how the symbol is to be imported
+within the WebAssembly linking environment.
+
+WebAssembly imports use a two-level namespace scheme, consisting of a module
+name, which typically identifies a module from which to import, and a field
+name, which typically identifies a field from that module to import. By
+default, module names for C/C++ symbols are assigned automatically by the
+linker. This attribute can be used to override the default behavior, and
+reuqest a specific module name be used instead.
+ }];
+}
+
+def WebAssemblyImportNameDocs : Documentation {
+ let Category = DocCatFunction;
+ let Content = [{
+Clang supports the ``__attribute__((import_name(<name>)))``
+attribute for the WebAssembly target. This attribute may be attached to a
+function declaration, where it modifies how the symbol is to be imported
+within the WebAssembly linking environment.
+
+WebAssembly imports use a two-level namespace scheme, consisting of a module
+name, which typically identifies a module from which to import, and a field
+name, which typically identifies a field from that module to import. By
+default, field names for C/C++ symbols are the same as their C/C++ symbol
+names. This attribute can be used to override the default behavior, and
+reuqest a specific field name be used instead.
+ }];
}
def ArtificialDocs : Documentation {