summaryrefslogtreecommitdiff
path: root/lib/AsmParser/LLParser.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2012-10-22 17:33:31 +0000
committerNadav Rotem <nrotem@apple.com>2012-10-22 17:33:31 +0000
commite743942bc8f8b067e014b8cbd2a205a53c7c67f9 (patch)
treeb19333deb9ae6ffccc5dad9fd0c62635361288ed /lib/AsmParser/LLParser.cpp
parent5f7d81022398f332b222552f5d980c4e3f1c542c (diff)
downloadllvm-e743942bc8f8b067e014b8cbd2a205a53c7c67f9.tar.gz
llvm-e743942bc8f8b067e014b8cbd2a205a53c7c67f9.tar.bz2
llvm-e743942bc8f8b067e014b8cbd2a205a53c7c67f9.tar.xz
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. """ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166422 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AsmParser/LLParser.cpp')
-rw-r--r--lib/AsmParser/LLParser.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/AsmParser/LLParser.cpp b/lib/AsmParser/LLParser.cpp
index 60e1741d69..cc7cc31246 100644
--- a/lib/AsmParser/LLParser.cpp
+++ b/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;