diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /lib/AST/VTTBuilder.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
Diffstat (limited to 'lib/AST/VTTBuilder.cpp')
-rw-r--r-- | lib/AST/VTTBuilder.cpp | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/lib/AST/VTTBuilder.cpp b/lib/AST/VTTBuilder.cpp index 53461ebbb8120..b946f10105f42 100644 --- a/lib/AST/VTTBuilder.cpp +++ b/lib/AST/VTTBuilder.cpp @@ -1,4 +1,4 @@ -//===--- VTTBuilder.cpp - C++ VTT layout builder --------------------------===// +//===- VTTBuilder.cpp - C++ VTT layout builder ----------------------------===// // // The LLVM Compiler Infrastructure // @@ -14,12 +14,16 @@ #include "clang/AST/VTTBuilder.h" #include "clang/AST/ASTContext.h" -#include "clang/AST/CXXInheritance.h" +#include "clang/AST/BaseSubobject.h" +#include "clang/AST/CharUnits.h" +#include "clang/AST/Decl.h" +#include "clang/AST/DeclCXX.h" #include "clang/AST/RecordLayout.h" -#include "clang/Basic/TargetInfo.h" -#include "llvm/Support/Format.h" -#include <algorithm> -#include <cstdio> +#include "clang/AST/Type.h" +#include "clang/Basic/LLVM.h" +#include "llvm/Support/Casting.h" +#include <cassert> +#include <cstdint> using namespace clang; @@ -28,9 +32,9 @@ using namespace clang; VTTBuilder::VTTBuilder(ASTContext &Ctx, const CXXRecordDecl *MostDerivedClass, bool GenerateDefinition) - : Ctx(Ctx), MostDerivedClass(MostDerivedClass), - MostDerivedClassLayout(Ctx.getASTRecordLayout(MostDerivedClass)), - GenerateDefinition(GenerateDefinition) { + : Ctx(Ctx), MostDerivedClass(MostDerivedClass), + MostDerivedClassLayout(Ctx.getASTRecordLayout(MostDerivedClass)), + GenerateDefinition(GenerateDefinition) { // Lay out this VTT. LayoutVTT(BaseSubobject(MostDerivedClass, CharUnits::Zero()), /*BaseIsVirtual=*/false); @@ -56,7 +60,7 @@ void VTTBuilder::AddVTablePointer(BaseSubobject Base, uint64_t VTableIndex, void VTTBuilder::LayoutSecondaryVTTs(BaseSubobject Base) { const CXXRecordDecl *RD = Base.getBase(); - for (const auto &I : RD->bases()) { + for (const auto &I : RD->bases()) { // Don't layout virtual bases. if (I.isVirtual()) continue; |