================
@@ -391,19 +390,24 @@ void CIRGenModule::constructAttributeList(
 
     assert(!cir::MissingFeatures::opCallAttrs());
 
-    // 'const', 'pure' and 'noalias' attributed functions are also nounwind.
-    if (targetDecl->hasAttr<ConstAttr>()) {
-      // gcc specifies that 'const' functions have greater restrictions than
-      // 'pure' functions, so they also cannot have infinite loops.
-      sideEffect = cir::SideEffect::Const;
-    } else if (targetDecl->hasAttr<PureAttr>()) {
-      // gcc specifies that 'pure' functions cannot have infinite loops.
-      sideEffect = cir::SideEffect::Pure;
+    std::optional<cir::ModRefInfo> access;
+    if (targetDecl->hasAttr<ConstAttr>())
+      access = cir::ModRefInfo::NoModRef;
----------------
adams381 wrote:

Added all eleven with the same names, so this reads `MemoryEffectsAttr::none` 
now.

https://github.com/llvm/llvm-project/pull/223890
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to