[PATCH] D46240: [llvm] Removing writeonly and readnone incompatibility.
Brian Homerding via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Apr 29 16:40:36 PDT 2018
homerdin updated this revision to Diff 144497.
https://reviews.llvm.org/D46240
Files:
docs/LangRef.rst
lib/IR/Verifier.cpp
test/Verifier/writeonly.ll
Index: test/Verifier/writeonly.ll
===================================================================
--- test/Verifier/writeonly.ll
+++ test/Verifier/writeonly.ll
@@ -1,13 +1,7 @@
; RUN: not llvm-as %s -o /dev/null 2>&1 | FileCheck %s
-declare void @a() readnone writeonly
-; CHECK: Attributes {{.*}} are incompatible
-
declare void @b() readonly writeonly
; CHECK: Attributes {{.*}} are incompatible
-declare void @c(i32* readnone writeonly %p)
-; CHECK: Attributes {{.*}} are incompatible
-
declare void @d(i32* readonly writeonly %p)
; CHECK: Attributes {{.*}} are incompatible
Index: lib/IR/Verifier.cpp
===================================================================
--- lib/IR/Verifier.cpp
+++ lib/IR/Verifier.cpp
@@ -1523,12 +1523,6 @@
"'readnone and readonly' are incompatible!",
V);
- Assert(!(Attrs.hasAttribute(Attribute::ReadNone) &&
- Attrs.hasAttribute(Attribute::WriteOnly)),
- "Attributes "
- "'readnone and writeonly' are incompatible!",
- V);
-
Assert(!(Attrs.hasAttribute(Attribute::ReadOnly) &&
Attrs.hasAttribute(Attribute::WriteOnly)),
"Attributes "
@@ -1660,10 +1654,6 @@
Attrs.hasFnAttribute(Attribute::ReadOnly)),
"Attributes 'readnone and readonly' are incompatible!", V);
- Assert(!(Attrs.hasFnAttribute(Attribute::ReadNone) &&
- Attrs.hasFnAttribute(Attribute::WriteOnly)),
- "Attributes 'readnone and writeonly' are incompatible!", V);
-
Assert(!(Attrs.hasFnAttribute(Attribute::ReadOnly) &&
Attrs.hasFnAttribute(Attribute::WriteOnly)),
"Attributes 'readonly and writeonly' are incompatible!", V);
Index: docs/LangRef.rst
===================================================================
--- docs/LangRef.rst
+++ docs/LangRef.rst
@@ -1524,9 +1524,7 @@
result (or decides to unwind an exception) based strictly on its arguments,
without dereferencing any pointer arguments or otherwise accessing
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 while it cannot unwind exceptions by calling
+ caller functions. 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46240.144497.patch
Type: text/x-patch
Size: 2550 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180429/40c43e8f/attachment.bin>
More information about the llvm-commits
mailing list