summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGExprConstant.cpp
diff options
context:
space:
mode:
authorWarren Hunt <whunt@google.com>2014-02-21 23:49:50 +0000
committerWarren Hunt <whunt@google.com>2014-02-21 23:49:50 +0000
commitfb00c88703fe98f6f8c95114f62e6ec732862194 (patch)
treee376266cca55f3fe5a1cde477d81dfccb9088172 /clang/lib/CodeGen/CGExprConstant.cpp
parent4db08df18e6f3ca85c045a2128d35e5665e303eb (diff)
downloadbcm5719-llvm-fb00c88703fe98f6f8c95114f62e6ec732862194.tar.gz
bcm5719-llvm-fb00c88703fe98f6f8c95114f62e6ec732862194.zip
Complete Rewrite of CGRecordLayoutBuilder
CGRecordLayoutBuilder was aging, complex, multi-pass, and shows signs of existing before ASTRecordLayoutBuilder. It redundantly performed many layout operations that are now performed by ASTRecordLayoutBuilder and asserted that the results were the same. With the addition of support for the MS-ABI, such as placement of vbptrs, vtordisps, different bitfield layout and a variety of other features, CGRecordLayoutBuilder was growing unwieldy in its redundancy. This patch re-architects CGRecordLayoutBuilder to not perform any redundant layout but rather, as directly as possible, lower an ASTRecordLayout to an llvm::type. The new architecture is significantly smaller and simpler than the CGRecordLayoutBuilder and contains fewer ABI-specific code paths. It's also one pass. The architecture of the new system is described in the comments. For the most part, the new system simply takes all of the fields and bases from an ASTRecordLayout, sorts them, inserts padding and dumps a record. Bitfields, unions and primary virtual bases make this process a bit more complicated. See the inline comments. In addition, this patch updates a few lit tests due to the fact that the new system computes more accurate llvm types than CGRecordLayoutBuilder. Each change is commented individually in the review. Differential Revision: http://llvm-reviews.chandlerc.com/D2795 llvm-svn: 201907
Diffstat (limited to 'clang/lib/CodeGen/CGExprConstant.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud