diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-10-27 19:48:08 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-10-27 19:48:08 +0000 |
commit | 7ab1c3ebd02c31bfa1333cc51de1261c1499d6f7 (patch) | |
tree | 5ea36a558472dffb657a4390fd2b1b3614b67267 /lib/CodeGen/CGCall.cpp | |
parent | 0aa9424c64eb337b0d23fc60262c671b180ccd8e (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.cpp | 2 |
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) |