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. 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: 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