diff options
author | Nadav Rotem <nrotem@apple.com> | 2012-10-22 17:33:31 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2012-10-22 17:33:31 +0000 |
commit | dbf47836341087b7058187302fb980053ea08537 (patch) | |
tree | df74f5c7064ce8796058e1c0332e7ee92e40fc38 /llvm/lib/AsmParser/LLParser.cpp | |
parent | 632aea92a57b5611cf54fc159cc3f77547a24ff7 (diff) | |
download | bcm5719-llvm-dbf47836341087b7058187302fb980053ea08537.tar.gz bcm5719-llvm-dbf47836341087b7058187302fb980053ea08537.zip |
Add the "ForceSizeOpt" attribute.
Patch by Quentin Colombet <qcolombet@apple.com>
Original description:
"""
The attached patch is the first step to have a better control on Oz related optimizations.
The Oz optimization level focuses on code size, thus I propose to add an attribute called ForceSizeOpt.
"""
llvm-svn: 166422
Diffstat (limited to 'llvm/lib/AsmParser/LLParser.cpp')
-rw-r--r-- | llvm/lib/AsmParser/LLParser.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/AsmParser/LLParser.cpp b/llvm/lib/AsmParser/LLParser.cpp index 60e1741d694..cc7cc312460 100644 --- a/llvm/lib/AsmParser/LLParser.cpp +++ b/llvm/lib/AsmParser/LLParser.cpp @@ -953,6 +953,7 @@ bool LLParser::ParseOptionalAttrs(AttrBuilder &B, unsigned AttrKind) { case lltok::kw_naked: B.addAttribute(Attributes::Naked); break; case lltok::kw_nonlazybind: B.addAttribute(Attributes::NonLazyBind); break; case lltok::kw_address_safety: B.addAttribute(Attributes::AddressSafety); break; + case lltok::kw_forcesizeopt: B.addAttribute(Attributes::ForceSizeOpt); break; case lltok::kw_alignstack: { unsigned Alignment; @@ -1011,6 +1012,7 @@ bool LLParser::ParseOptionalAttrs(AttrBuilder &B, unsigned AttrKind) { case lltok::kw_nonlazybind: case lltok::kw_returns_twice: case lltok::kw_address_safety: + case lltok::kw_forcesizeopt: if (AttrKind != 2) HaveError |= Error(AttrLoc, "invalid use of function-only attribute"); break; |