================
@@ -405,6 +405,13 @@ bool GlobalValue::isNoipaFnDef() const {
return F->hasFnAttribute(Attribute::NoIPA);
}
+bool GlobalValue::isOptNoneFnDef() const {
+ const Function *F = dyn_cast<Function>(this);
+ if (!F || F->isDeclaration())
+ return false;
+ return F->hasFnAttribute(Attribute::OptimizeNone);
----------------
antoniofrighetto wrote:
Nit, but not strong:
```suggestion
const auto *F = dyn_cast<Function>(this);
return F && !F->isDeclaration() && F->hasFnAttribute(Attribute::OptimizeNone);
```
https://github.com/llvm/llvm-project/pull/211804
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits