Set OptimizeForSize LLVM function attribute with -Os.

llvm-svn: 85278
diff --git a/clang/lib/CodeGen/CGCall.cpp b/clang/lib/CodeGen/CGCall.cpp
index 78655168..06cd05c 100644
--- a/clang/lib/CodeGen/CGCall.cpp
+++ b/clang/lib/CodeGen/CGCall.cpp
@@ -441,6 +441,8 @@
       RetAttrs |= llvm::Attribute::NoAlias;
   }
 
+  if (CompileOpts.OptimizeSize)
+    FuncAttrs |= llvm::Attribute::OptimizeForSize;
   if (CompileOpts.DisableRedZone)
     FuncAttrs |= llvm::Attribute::NoRedZone;
   if (CompileOpts.NoImplicitFloat)