aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGCall.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-10-27 19:48:08 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-10-27 19:48:08 +0000
commit7ab1c3ebd02c31bfa1333cc51de1261c1499d6f7 (patch)
tree5ea36a558472dffb657a4390fd2b1b3614b67267 /lib/CodeGen/CGCall.cpp
parent0aa9424c64eb337b0d23fc60262c671b180ccd8e (diff)
Set OptimizeForSize LLVM function attribute with -Os.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@85278 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCall.cpp')
-rw-r--r--lib/CodeGen/CGCall.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/CodeGen/CGCall.cpp b/lib/CodeGen/CGCall.cpp
index 78655168e8..06cd05cc75 100644
--- a/lib/CodeGen/CGCall.cpp
+++ b/lib/CodeGen/CGCall.cpp
@@ -441,6 +441,8 @@ void CodeGenModule::ConstructAttributeList(const CGFunctionInfo &FI,
RetAttrs |= llvm::Attribute::NoAlias;
}
+ if (CompileOpts.OptimizeSize)
+ FuncAttrs |= llvm::Attribute::OptimizeForSize;
if (CompileOpts.DisableRedZone)
FuncAttrs |= llvm::Attribute::NoRedZone;
if (CompileOpts.NoImplicitFloat)