]> granicus.if.org Git - clang/commitdiff
Use TypeAlignment constant rather than fixed alignment of 8
authorDouglas Gregor <dgregor@apple.com>
Fri, 10 Dec 2010 08:12:03 +0000 (08:12 +0000)
committerDouglas Gregor <dgregor@apple.com>
Fri, 10 Dec 2010 08:12:03 +0000 (08:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@121473 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Sema/SemaType.cpp

index e1ee91843d979d71b9badaf532f8a84f2eabacc8..5f860106024cebbff5a23ddf60e20a3551c7aa10 100644 (file)
@@ -1722,7 +1722,8 @@ ParsedType Sema::CreateParsedType(QualType T, TypeSourceInfo *TInfo) {
   // FIXME: LocInfoTypes are "transient", only needed for passing to/from Parser
   // and Sema during declaration parsing. Try deallocating/caching them when
   // it's appropriate, instead of allocating them and keeping them around.
-  LocInfoType *LocT = (LocInfoType*)BumpAlloc.Allocate(sizeof(LocInfoType), 8);
+  LocInfoType *LocT = (LocInfoType*)BumpAlloc.Allocate(sizeof(LocInfoType), 
+                                                       TypeAlignment);
   new (LocT) LocInfoType(T, TInfo);
   assert(LocT->getTypeClass() != T->getTypeClass() &&
          "LocInfoType's TypeClass conflicts with an existing Type class");