diff options
| author | 2020-08-03 15:06:44 +0000 | |
|---|---|---|
| committer | 2020-08-03 15:06:44 +0000 | |
| commit | b64793999546ed8adebaeebd9d8345d18db8927d (patch) | |
| tree | 4357c27b561d73b0e089727c6ed659f2ceff5f47 /gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp | |
| parent | Add support for UTF-8 DISPLAY-HINTs with octet length. For now only (diff) | |
| download | wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.tar.xz wireguard-openbsd-b64793999546ed8adebaeebd9d8345d18db8927d.zip | |
Remove LLVM 8.0.1 files.
Diffstat (limited to 'gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp')
| -rw-r--r-- | gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp b/gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp deleted file mode 100644 index 9db23d50d0a..00000000000 --- a/gnu/llvm/tools/clang/lib/AST/RecordLayout.cpp +++ /dev/null @@ -1,95 +0,0 @@ -//===- RecordLayout.cpp - Layout information for a struct/union -----------===// -// -// The LLVM Compiler Infrastructure -// -// This file is distributed under the University of Illinois Open Source -// License. See LICENSE.TXT for details. -// -//===----------------------------------------------------------------------===// -// -// This file defines the RecordLayout interface. -// -//===----------------------------------------------------------------------===// - -#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; - -void ASTRecordLayout::Destroy(ASTContext &Ctx) { - if (CXXInfo) { - CXXInfo->~CXXRecordLayoutInfo(); - Ctx.Deallocate(CXXInfo); - } - this->~ASTRecordLayout(); - Ctx.Deallocate(this); -} - -ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, CharUnits size, - CharUnits alignment, - CharUnits unadjustedAlignment, - CharUnits requiredAlignment, - CharUnits datasize, - ArrayRef<uint64_t> fieldoffsets) - : Size(size), DataSize(datasize), Alignment(alignment), - UnadjustedAlignment(unadjustedAlignment), - RequiredAlignment(requiredAlignment) { - FieldOffsets.append(Ctx, fieldoffsets.begin(), fieldoffsets.end()); -} - -// Constructor for C++ records. -ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, - CharUnits size, CharUnits alignment, - CharUnits unadjustedAlignment, - CharUnits requiredAlignment, - bool hasOwnVFPtr, bool hasExtendableVFPtr, - CharUnits vbptroffset, - CharUnits datasize, - ArrayRef<uint64_t> fieldoffsets, - CharUnits nonvirtualsize, - CharUnits nonvirtualalignment, - CharUnits SizeOfLargestEmptySubobject, - const CXXRecordDecl *PrimaryBase, - bool IsPrimaryBaseVirtual, - const CXXRecordDecl *BaseSharingVBPtr, - bool EndsWithZeroSizedObject, - bool LeadsWithZeroSizedBase, - const BaseOffsetsMapTy& BaseOffsets, - const VBaseOffsetsMapTy& VBaseOffsets) - : Size(size), DataSize(datasize), Alignment(alignment), - UnadjustedAlignment(unadjustedAlignment), - RequiredAlignment(requiredAlignment), CXXInfo(new (Ctx) CXXRecordLayoutInfo) -{ - FieldOffsets.append(Ctx, fieldoffsets.begin(), fieldoffsets.end()); - - CXXInfo->PrimaryBase.setPointer(PrimaryBase); - CXXInfo->PrimaryBase.setInt(IsPrimaryBaseVirtual); - CXXInfo->NonVirtualSize = nonvirtualsize; - CXXInfo->NonVirtualAlignment = nonvirtualalignment; - CXXInfo->SizeOfLargestEmptySubobject = SizeOfLargestEmptySubobject; - CXXInfo->BaseOffsets = BaseOffsets; - CXXInfo->VBaseOffsets = VBaseOffsets; - CXXInfo->HasOwnVFPtr = hasOwnVFPtr; - CXXInfo->VBPtrOffset = vbptroffset; - CXXInfo->HasExtendableVFPtr = hasExtendableVFPtr; - CXXInfo->BaseSharingVBPtr = BaseSharingVBPtr; - CXXInfo->EndsWithZeroSizedObject = EndsWithZeroSizedObject; - CXXInfo->LeadsWithZeroSizedBase = LeadsWithZeroSizedBase; - -#ifndef NDEBUG - if (const CXXRecordDecl *PrimaryBase = getPrimaryBase()) { - if (isPrimaryBaseVirtual()) { - if (Ctx.getTargetInfo().getCXXABI().hasPrimaryVBases()) { - assert(getVBaseClassOffset(PrimaryBase).isZero() && - "Primary virtual base must be at offset 0!"); - } - } else { - assert(getBaseClassOffset(PrimaryBase).isZero() && - "Primary base must be at offset 0!"); - } - } -#endif -} |
