[llvm-commits] [llvm-gcc-4.2] r76201 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Anton Korobeynikov
asl at math.spbu.ru
Fri Jul 17 11:13:05 PDT 2009
Author: asl
Date: Fri Jul 17 13:13:04 2009
New Revision: 76201
URL: http://llvm.org/viewvc/llvm-project?rev=76201&view=rev
Log:
Handle 'naked' attribute
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=76201&r1=76200&r2=76201&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Fri Jul 17 13:13:04 2009
@@ -518,10 +518,14 @@
else if (flag_stack_protect == 2)
Fn->addFnAttr(Attribute::StackProtectReq);
+ // Handle naked attribute
+ if (lookup_attribute ("naked", DECL_ATTRIBUTES (FnDecl)))
+ Fn->addFnAttr(Attribute::Naked);
+
// Handle annotate attributes
if (DECL_ATTRIBUTES(FnDecl))
AddAnnotateAttrsToGlobal(Fn, FnDecl);
-
+
// Mark the function "nounwind" if not doing exception handling.
if (!flag_exceptions)
Fn->setDoesNotThrow();
More information about the llvm-commits
mailing list