From e22b0d1713d9ed780676df1bc8c68b07d9801f4c Mon Sep 17 00:00:00 2001 From: "John F. Carr" Date: Tue, 10 Oct 2023 15:02:02 -0400 Subject: [PATCH] Set memory(none) instead of readonly on strand_pure function definition --- clang/lib/CodeGen/CGCall.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp index 6ed9d0e8c48e..4ea421a57d92 100644 --- a/clang/lib/CodeGen/CGCall.cpp +++ b/clang/lib/CodeGen/CGCall.cpp @@ -2230,7 +2230,7 @@ void CodeGenModule::ConstructAttributeList(StringRef Name, } if (TargetDecl->hasAttr()) { FuncAttrs.addAttribute(llvm::Attribute::StrandPure); - FuncAttrs.addAttribute(llvm::Attribute::ReadOnly); + FuncAttrs.addMemoryAttr(llvm::MemoryEffects::readOnly()); FuncAttrs.addAttribute(llvm::Attribute::NoUnwind); } if (TargetDecl->hasAttr()) {