diff options
author | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-11-10 00:59:22 +0000 |
---|---|---|
committer | Eugene Zelenko <eugene.zelenko@gmail.com> | 2017-11-10 00:59:22 +0000 |
commit | 8998f10e553fbca8db6cbce1cc1b097055b26b16 (patch) | |
tree | e1f70ca5d645dab9b9b77683a6438adc7aaa86e8 /clang/lib/AST/RecordLayout.cpp | |
parent | a73960213eac65cbb099a52318035cf4539b7703 (diff) |
[AST] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC).
llvm-svn: 317854
Diffstat (limited to 'clang/lib/AST/RecordLayout.cpp')
-rw-r--r-- | clang/lib/AST/RecordLayout.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/AST/RecordLayout.cpp b/clang/lib/AST/RecordLayout.cpp index 299fd111bf6a..37fe029f53bd 100644 --- a/clang/lib/AST/RecordLayout.cpp +++ b/clang/lib/AST/RecordLayout.cpp @@ -1,4 +1,4 @@ -//===-- RecordLayout.cpp - Layout information for a struct/union -*- C++ -*-==// +//===- RecordLayout.cpp - Layout information for a struct/union -----------===// // // The LLVM Compiler Infrastructure // @@ -11,9 +11,11 @@ // //===----------------------------------------------------------------------===// -#include "clang/AST/ASTContext.h" #include "clang/AST/RecordLayout.h" +#include "clang/AST/ASTContext.h" +#include "clang/Basic/TargetCXXABI.h" #include "clang/Basic/TargetInfo.h" +#include <cassert> using namespace clang; @@ -32,7 +34,7 @@ ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, CharUnits size, CharUnits datasize, ArrayRef<uint64_t> fieldoffsets) : Size(size), DataSize(datasize), Alignment(alignment), - RequiredAlignment(requiredAlignment), CXXInfo(nullptr) { + RequiredAlignment(requiredAlignment) { FieldOffsets.append(Ctx, fieldoffsets.begin(), fieldoffsets.end()); } @@ -73,7 +75,6 @@ ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, CXXInfo->EndsWithZeroSizedObject = EndsWithZeroSizedObject; CXXInfo->LeadsWithZeroSizedBase = LeadsWithZeroSizedBase; - #ifndef NDEBUG if (const CXXRecordDecl *PrimaryBase = getPrimaryBase()) { if (isPrimaryBaseVirtual()) { |