summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSanjoy Das <sanjoy@playingwithpointers.com>2017-02-13 23:19:07 +0000
committerSanjoy Das <sanjoy@playingwithpointers.com>2017-02-13 23:19:07 +0000
commit5be2e8415c473b16bc618f9c9a4da7fe076a69fa (patch)
treec1304c8981b6d1b421a2391f2a62bb963abc9d58
parenta3ff9942684abd60ec56d5a3a724de1eab54b5cd (diff)
downloadbcm5719-llvm-5be2e8415c473b16bc618f9c9a4da7fe076a69fa.tar.gz
bcm5719-llvm-5be2e8415c473b16bc618f9c9a4da7fe076a69fa.zip
[LangRef] Explicitly allow readnone and reaodnly functions to unwind
Summary: This change edits the language reference to explicitly allow the existence of readnone and readonly functions that can throw. Full discussion at http://lists.llvm.org/pipermail/llvm-dev/2017-January/108637.html Reviewers: dberlin, chandlerc, hfinkel, majnemer Reviewed By: majnemer Subscribers: majnemer, mcrosier, llvm-commits Differential Revision: https://reviews.llvm.org/D28740 llvm-svn: 295000
-rw-r--r--llvm/docs/LangRef.rst13
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 068fb6bde61..ce8b6f04ee0 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -1474,8 +1474,10 @@ example:
any mutable state (e.g. memory, control registers, etc) visible to
caller functions. It does not write through any pointer arguments
(including ``byval`` arguments) and never changes any state visible
- to callers. This means that it cannot unwind exceptions by calling
- the ``C++`` exception throwing methods.
+ to callers. This means while it cannot unwind exceptions by calling
+ the ``C++`` exception throwing methods (since they write to memory), there may
+ be non-``C++`` mechanisms that throw exceptions without writing to LLVM
+ visible memory.
On an argument, this attribute indicates that the function does not
dereference that pointer argument, even though it may read or write the
@@ -1487,9 +1489,10 @@ example:
caller functions. It may dereference pointer arguments and read
state that may be set in the caller. A readonly function always
returns the same value (or unwinds an exception identically) when
- called with the same set of arguments and global state. It cannot
- unwind an exception by calling the ``C++`` exception throwing
- methods.
+ called with the same set of arguments and global state. This means while it
+ cannot unwind exceptions by calling the ``C++`` exception throwing methods
+ (since they write to memory), there may be non-``C++`` mechanisms that throw
+ exceptions without writing to LLVM visible memory.
On an argument, this attribute indicates that the function does not write
through this pointer argument, even though it may write to the memory that
OpenPOWER on IntegriCloud