aaron.ballman added inline comments.
================ Comment at: clang/lib/Sema/SemaAttr.cpp:1207-1213 + FD->addAttr(FramePointerAttr::CreateImplicit(Context, Kind)); +} + +void Sema::AddOptsize(FunctionDecl *FD, SourceLocation Loc) { + FD->dropAttr<OptimizeSizeAttr>(); + OptimizeSizeAttr::Kind Kind = OptimizeSizeAttr::On; + FD->addAttr(OptimizeSizeAttr::CreateImplicit(Context, Kind)); ---------------- Rather than creating two new, implicit attributes for this, why not add support for `__attribute__((optimize(...)))` from GCC and reuse that one? https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes It seems like that serves the same function as these implicit attributes, but then users would get two features for the price of one. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D125723/new/ https://reviews.llvm.org/D125723 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits