]> granicus.if.org Git - clang/commitdiff
Copy some clenaups from Eli to code that I copied. :-)
authorMike Stump <mrs@apple.com>
Sun, 22 Feb 2009 13:55:31 +0000 (13:55 +0000)
committerMike Stump <mrs@apple.com>
Sun, 22 Feb 2009 13:55:31 +0000 (13:55 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65286 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenFunction.h

index cffa7fa5ec12bdd36c4d069b0745f16938d01366..8bda453ee72863e3471fd39de91fa7b13a5fb85d 100644 (file)
@@ -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;