diff options
author | Mike Stump <mrs@apple.com> | 2009-10-05 21:58:44 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-10-05 21:58:44 +0000 |
commit | c5e153c50e510dabdf4d7b1c83cba48fb4e40bdf (patch) | |
tree | 9bc4b810a3a244694048a5211b3d30bdc6d27f73 /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | c2ac4f020b2a424a51300a93c7d655655f6e50ed (diff) | |
download | bcm5719-llvm-c5e153c50e510dabdf4d7b1c83cba48fb4e40bdf.tar.gz bcm5719-llvm-c5e153c50e510dabdf4d7b1c83cba48fb4e40bdf.zip |
Respect alignments better.
llvm-svn: 83328
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r-- | clang/lib/CodeGen/CodeGenModule.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index fdc97409eb4..f7fe69e3262 100644 --- a/clang/lib/CodeGen/CodeGenModule.cpp +++ b/clang/lib/CodeGen/CodeGenModule.cpp @@ -345,6 +345,9 @@ void CodeGenModule::SetLLVMFunctionAttributesForDefinition(const Decl *D, if (D->hasAttr<NoInlineAttr>()) F->addFnAttr(llvm::Attribute::NoInline); + + if (const AlignedAttr *AA = D->getAttr<AlignedAttr>()) + F->setAlignment(AA->getAlignment()/8); } void CodeGenModule::SetCommonAttributes(const Decl *D, |