[llvm-commits] [llvm-gcc-4.2] r83233 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Evan Cheng
evan.cheng at apple.com
Thu Oct 1 21:44:52 PDT 2009
Author: evancheng
Date: Thu Oct 1 23:44:52 2009
New Revision: 83233
URL: http://llvm.org/viewvc/llvm-project?rev=83233&view=rev
Log:
Handle aligned attribute on function declaration.
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=83233&r1=83232&r2=83233&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Thu Oct 1 23:44:52 2009
@@ -503,6 +503,10 @@
// Handle visibility style
handleVisibility(FnDecl, Fn);
+ // Handle attribute "aligned".
+ if (lookup_attribute ("aligned", DECL_ATTRIBUTES (FnDecl)))
+ Fn->setAlignment(DECL_ALIGN (FnDecl) / 8);
+
// Handle functions in specified sections.
if (DECL_SECTION_NAME(FnDecl))
Fn->setSection(TREE_STRING_POINTER(DECL_SECTION_NAME(FnDecl)));
More information about the llvm-commits
mailing list