aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-10-05 21:58:44 +0000
committerMike Stump <mrs@apple.com>2009-10-05 21:58:44 +0000
commitf55314dce992fd60816ba337ad151a2fb7c42239 (patch)
tree67686de5b0712af88ad40d4d913fbd890d055117 /lib/CodeGen
parentf393c3b770c86446b20e6fd4bcf08a31442d1b1d (diff)
Respect alignments better.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83328 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index fdc97409eb..f7fe69e326 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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,