aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2017-09-05 20:14:58 +0000
committerReid Kleckner <rnk@google.com>2017-09-05 20:14:58 +0000
commitc86178ea3759fc69d6d82efe45c5b3f613a9492a (patch)
tree2b40784294b3322d9ad3ef0adf6d0eafe24a9dc9 /docs
parentf7dd8e2ac0a427d290964362c408eb9e9a1c950c (diff)
downloadllvm-c86178ea3759fc69d6d82efe45c5b3f613a9492a.tar.gz
Add llvm.codeview.annotation to implement MSVC __annotation
Summary: This intrinsic represents a label with a list of associated metadata strings. It is modelled as reading and writing inaccessible memory so that it won't be removed as dead code. I think the intention is that the annotation strings should appear at most once in the debug info, so I marked it noduplicate. We are allowed to inline code with annotations as long as we strip the annotation, but that can be done later. Reviewers: majnemer Subscribers: eraman, llvm-commits, hiraditya Differential Revision: https://reviews.llvm.org/D36904 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312569 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/LangRef.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/docs/LangRef.rst b/docs/LangRef.rst
index 49ded73aaf6..eb7638fed36 100644
--- a/docs/LangRef.rst
+++ b/docs/LangRef.rst
@@ -13626,6 +13626,27 @@ with arbitrary strings. This can be useful for special purpose
optimizations that want to look for these annotations. These have no
other defined use; they are ignored by code generation and optimization.
+'``llvm.codeview.annotation``' Intrinsic
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+Syntax:
+"""""""
+
+This annotation emits a label at its program point and an associated
+``S_ANNOTATION`` codeview record with some additional string metadata. This is
+used to implement MSVC's ``__annotation`` intrinsic. It is marked
+``noduplicate``, so calls to this intrinsic prevent inlining and should be
+considered expensive.
+
+::
+
+ declare void @llvm.codeview.annotation(metadata)
+
+Arguments:
+""""""""""
+
+The argument should be an MDTuple containing any number of MDStrings.
+
'``llvm.trap``' Intrinsic
^^^^^^^^^^^^^^^^^^^^^^^^^