diff --git a/clang/include/clang/Basic/Attr.td b/clang/include/clang/Basic/Attr.td index fe6295f3069cf0..d1f407259cb6e3 100644 --- a/clang/include/clang/Basic/Attr.td +++ b/clang/include/clang/Basic/Attr.td @@ -1438,7 +1438,7 @@ def Final : InheritableAttr { def MinSize : InheritableAttr { let Spellings = [Clang<"minsize">]; let Subjects = SubjectList<[Function, ObjCMethod], ErrorDiag>; - let Documentation = [Undocumented]; + let Documentation = [MinSizeDocs]; } def FlagEnum : InheritableAttr { diff --git a/clang/include/clang/Basic/AttrDocs.td b/clang/include/clang/Basic/AttrDocs.td index 872eb8a266734e..59bbc80708ed56 100644 --- a/clang/include/clang/Basic/AttrDocs.td +++ b/clang/include/clang/Basic/AttrDocs.td @@ -5833,6 +5833,15 @@ attribute can also be written using C++11 syntax: ``[[mig::server_routine]]``. }]; } +def MinSizeDocs : Documentation { + let Category = DocCatFunction; + let Content = [{ +This function attribute indicates that optimization passes and code generator passes +make choices that keep the function code size as small as possible. Optimizations may +also sacrifice runtime performance in order to minimize the size of the generated code. + }]; +} + def MSAllocatorDocs : Documentation { let Category = DocCatFunction; let Content = [{