[cfe-commits] r121473 - /cfe/trunk/lib/Sema/SemaType.cpp
Douglas Gregor
dgregor at apple.com
Fri Dec 10 00:12:03 PST 2010
Author: dgregor
Date: Fri Dec 10 02:12:03 2010
New Revision: 121473
URL: http://llvm.org/viewvc/llvm-project?rev=121473&view=rev
Log:
Use TypeAlignment constant rather than fixed alignment of 8
Modified:
cfe/trunk/lib/Sema/SemaType.cpp
Modified: cfe/trunk/lib/Sema/SemaType.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Sema/SemaType.cpp?rev=121473&r1=121472&r2=121473&view=diff
==============================================================================
--- cfe/trunk/lib/Sema/SemaType.cpp (original)
+++ cfe/trunk/lib/Sema/SemaType.cpp Fri Dec 10 02:12:03 2010
@@ -1722,7 +1722,8 @@
// 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");
More information about the cfe-commits
mailing list