summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorQuentin Colombet <qcolombet@apple.com>2012-10-29 17:56:23 +0000
committerQuentin Colombet <qcolombet@apple.com>2012-10-29 17:56:23 +0000
commit0d6b5e5fdedb097aa0446ce42694f21278b8ec1d (patch)
treea60483bdf809526561d28c2cfb9494bba02f1ebf /clang/lib/CodeGen/CodeGenModule.cpp
parent2b86e48b3a2cd8db0b9afdb7790b59e01f72e9be (diff)
downloadbcm5719-llvm-0d6b5e5fdedb097aa0446ce42694f21278b8ec1d.tar.gz
bcm5719-llvm-0d6b5e5fdedb097aa0446ce42694f21278b8ec1d.zip
Make forcesizeopt attribute available to the end user
llvm-svn: 166946
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 9617de8eb7a..523e2d26247 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -583,6 +583,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D,
if (D->hasAttr<ColdAttr>())
F->addFnAttr(llvm::Attributes::OptimizeForSize);
+ if (D->hasAttr<ForceSizeOptAttr>())
+ F->addFnAttr(llvm::Attributes::ForceSizeOpt);
+
if (isa<CXXConstructorDecl>(D) || isa<CXXDestructorDecl>(D))
F->setUnnamedAddr(true);
OpenPOWER on IntegriCloud