about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2025-09-23 09:28:24 +0200
committerRalf Jung <post@ralfj.de>2025-09-23 09:28:24 +0200
commit0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb (patch)
tree406fd3b8a96508cae5b1ac33ccc57ca641f4cc85 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent3c8d8da693eb5d63099eef5cf4a73106a3a2ba25 (diff)
parentf6092f224d2b1774b31033f12d0bee626943b02f (diff)
downloadrust-0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb.tar.gz
rust-0cd72a2f8d90672d0c7ce38a4e0d6ac3975aafbb.zip
Merge ref 'f6092f224d2b' from rust-lang/rust
Pull recent changes from https://github.com/rust-lang/rust via Josh.

Upstream ref: f6092f224d2b1774b31033f12d0bee626943b02f
Filtered ref: f843cd4f29bdcd8d474dbb9e5e4365eb7f263ec6

This merge was created using https://github.com/rust-lang/josh-sync.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index 64151962321..414274f24fb 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -553,6 +553,7 @@ enum class LLVMRustMemoryEffects {
   None,
   ReadOnly,
   InaccessibleMemOnly,
+  ReadOnlyNotPure,
 };
 
 extern "C" LLVMAttributeRef
@@ -568,6 +569,10 @@ LLVMRustCreateMemoryEffectsAttr(LLVMContextRef C,
   case LLVMRustMemoryEffects::InaccessibleMemOnly:
     return wrap(Attribute::getWithMemoryEffects(
         *unwrap(C), MemoryEffects::inaccessibleMemOnly()));
+  case LLVMRustMemoryEffects::ReadOnlyNotPure:
+    return wrap(Attribute::getWithMemoryEffects(
+        *unwrap(C),
+        MemoryEffects::readOnly() | MemoryEffects::inaccessibleMemOnly()));
   default:
     report_fatal_error("bad MemoryEffects.");
   }