HomePhabricator

[ast] Put the Stmt hierarchy on a diet for 64 bit targets.

Description

[ast] Put the Stmt hierarchy on a diet for 64 bit targets.

Previously we would waste 32 bits on alignment, use LLVM_ALIGNAS to
free that space for derived classes an place. Sadly still have to #ifdef
out MSVC 2013 because it can't align based on a sizeof expr.

No intended functionality change. New byte counts:
sizeof(before) | sizeof(after)

LabelStmt: 32 | LabelStmt: 24
SwitchStmt: 48 | SwitchStmt: 40
WhileStmt: 40 | WhileStmt: 32
DoStmt: 40 | DoStmt: 32
ForStmt: 64 | ForStmt: 56
ContinueStmt: 16 | ContinueStmt: 8
BreakStmt: 16 | BreakStmt: 8
ReturnStmt: 32 | ReturnStmt: 24
AsmStmt: 40 | AsmStmt: 32
GCCAsmStmt: 80 | GCCAsmStmt: 72
MSAsmStmt: 96 | MSAsmStmt: 88
SEHExceptStmt: 32 | SEHExceptStmt: 24
SEHFinallyStmt: 24 | SEHFinallyStmt: 16
SEHLeaveStmt: 16 | SEHLeaveStmt: 8
CapturedStmt: 32 | CapturedStmt: 24
CXXCatchStmt: 32 | CXXCatchStmt: 24
CXXForRangeStmt: 72 | CXXForRangeStmt: 64
ObjCAtFinallyStmt: 24 | ObjCAtFinallyStmt: 16
ObjCAtSynchronizedStmt: 32 | ObjCAtSynchronizedStmt: 24
ObjCAtThrowStmt: 24 | ObjCAtThrowStmt: 16
ObjCAutoreleasePoolStmt: 24 | ObjCAutoreleasePoolStmt: 16

Details

Committed
d0kApr 2 2015, 8:29 AM
Parents
rL233920: Fix typo and reword in LangRef
Branches
Unknown
Tags
Unknown