]> granicus.if.org Git - clang/commit
Store inheritance paths after CastExprs instead of inside them.
authorJohn McCall <rjmccall@apple.com>
Sat, 7 Aug 2010 06:22:56 +0000 (06:22 +0000)
committerJohn McCall <rjmccall@apple.com>
Sat, 7 Aug 2010 06:22:56 +0000 (06:22 +0000)
commitf871d0cc377a1367b519a6cce26be74607566eba
treef4304b917361b0a077555fca4955eac01309d642
parent93a00357f2795404c6709d9e06b4f717c82e6efb
Store inheritance paths after CastExprs instead of inside them.
This takes some trickery since CastExpr has subclasses (and indeed,
is abstract).

Also, smoosh the CastKind into the bitfield from Expr.

Drops two words of storage from Expr in the common case of expressions
which don't need inheritance paths.  Avoids a separate allocation and
another word of overhead in cases needing inheritance paths.  Also has
the advantage of not leaking memory, since destructors for AST nodes are
never run.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@110507 91177308-0d34-0410-b5e6-96231b3b80d8
27 files changed:
include/clang/AST/Expr.h
include/clang/AST/ExprCXX.h
lib/AST/ASTImporter.cpp
lib/AST/Expr.cpp
lib/AST/ExprCXX.cpp
lib/AST/StmtDumper.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGExpr.cpp
lib/CodeGen/CGExprAgg.cpp
lib/CodeGen/CGExprConstant.cpp
lib/CodeGen/CGExprScalar.cpp
lib/CodeGen/CGObjC.cpp
lib/CodeGen/CodeGenFunction.h
lib/CodeGen/CodeGenModule.h
lib/Frontend/PCHReaderStmt.cpp
lib/Frontend/PCHWriterStmt.cpp
lib/Rewrite/RewriteObjC.cpp
lib/Sema/Sema.cpp
lib/Sema/Sema.h
lib/Sema/SemaCXXCast.cpp
lib/Sema/SemaChecking.cpp
lib/Sema/SemaDecl.cpp
lib/Sema/SemaDeclCXX.cpp
lib/Sema/SemaExpr.cpp
lib/Sema/SemaExprCXX.cpp
lib/Sema/SemaInit.cpp
lib/Sema/SemaOverload.cpp