aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodeGenFunction.h
diff options
context:
space:
mode:
authorMike Stump <mrs@apple.com>2009-02-22 13:55:31 +0000
committerMike Stump <mrs@apple.com>2009-02-22 13:55:31 +0000
commit6eef49819da450de398dcbe008066ccc9546ee31 (patch)
tree6b1f85cb51417f1a89640aa52883ad9f36b2410f /lib/CodeGen/CodeGenFunction.h
parent20733cd4fd5c9755cdfab583db862223c93732c8 (diff)
Copy some clenaups from Eli to code that I copied. :-)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r--lib/CodeGen/CodeGenFunction.h7
1 files changed, 1 insertions, 6 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h
index cffa7fa5ec..8bda453ee7 100644
--- a/lib/CodeGen/CodeGenFunction.h
+++ b/lib/CodeGen/CodeGenFunction.h
@@ -293,12 +293,7 @@ public:
}
uint64_t getBlockOffset(ValueDecl *D) {
uint64_t Size = getContext().getTypeSize(D->getType()) / 8;
-
- unsigned Align = getContext().getTypeAlign(D->getType());
- if (const AlignedAttr* AA = D->getAttr<AlignedAttr>())
- Align = std::max(Align, AA->getAlignment());
-
- return getBlockOffset(Size, Align);
+ return getBlockOffset(Size, getContext().getDeclAlignInBytes(D)*8);
}
std::map<Decl*, uint64_t> BlockDecls;