From 0d6b5e5fdedb097aa0446ce42694f21278b8ec1d Mon Sep 17 00:00:00 2001 From: Quentin Colombet Date: Mon, 29 Oct 2012 17:56:23 +0000 Subject: Make forcesizeopt attribute available to the end user llvm-svn: 166946 --- clang/lib/CodeGen/CodeGenModule.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/CodeGen/CodeGenModule.cpp') diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index 9617de8..523e2d2 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()) F->addFnAttr(llvm::Attributes::OptimizeForSize); + if (D->hasAttr()) + F->addFnAttr(llvm::Attributes::ForceSizeOpt); + if (isa(D) || isa(D)) F->setUnnamedAddr(true); -- cgit v1.1