[PATCH] D126984: [clang] Add initial support for gcc's optimize function attribute
Stephen Long via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 3 11:39:20 PDT 2022
steplong added inline comments.
================
Comment at: clang/lib/CodeGen/CGCall.cpp:2169
+ HasOptnone = TargetDecl->hasAttr<OptimizeNoneAttr>() ||
+ (TargetDecl->hasAttr<OptimizeAttr>() &&
+ TargetDecl->getAttr<OptimizeAttr>()->getLevel() == "0");
----------------
I don't think this is the most ergonomic way. Let me know if you have a better idea of doing this
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D126984/new/
https://reviews.llvm.org/D126984
More information about the cfe-commits
mailing list