From ba927d9b26ead2ad535c7761b8862d8e82c41b13 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166946 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/CodeGen/CodeGenModule.cpp') 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()) F->addFnAttr(llvm::Attributes::OptimizeForSize); + if (D->hasAttr()) + F->addFnAttr(llvm::Attributes::ForceSizeOpt); + if (isa(D) || isa(D)) F->setUnnamedAddr(true); -- cgit v1.2.3-70-g09d2