diff options
author | Quentin Colombet <qcolombet@apple.com> | 2012-10-29 17:56:23 +0000 |
---|---|---|
committer | Quentin Colombet <qcolombet@apple.com> | 2012-10-29 17:56:23 +0000 |
commit | ba927d9b26ead2ad535c7761b8862d8e82c41b13 (patch) | |
tree | e947f1b128568fe31775441d4eba9519071916e5 /lib/CodeGen/CodeGenModule.cpp | |
parent | c0e44454bd78b8b4f3d70f08cf1edd5466b0c798 (diff) |
Make forcesizeopt attribute available to the end user
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166946 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp index 9617de8eb7..523e2d2624 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/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); |