From dd0cb22bd62e1e835327f478a2dbf0b8fa439713 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Wed, 29 Sep 2010 18:20:25 +0000 Subject: Add support for attribute((naked)), patch by Zoxc on cfe-commits! - Minor style tweaks by me. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@115056 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 805b33e324..12c8f7919f 100644 --- a/lib/CodeGen/CodeGenModule.cpp +++ b/lib/CodeGen/CodeGenModule.cpp @@ -457,6 +457,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (D->hasAttr()) F->addFnAttr(llvm::Attribute::AlwaysInline); + if (D->hasAttr()) + F->addFnAttr(llvm::Attribute::Naked); + if (D->hasAttr()) F->addFnAttr(llvm::Attribute::NoInline); -- cgit v1.2.3-18-g5258