llvm/clang/lib/AST/RecordLayout.cpp

//===- RecordLayout.cpp - Layout information for a struct/union -----------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
//  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>

usingnamespaceclang;

void ASTRecordLayout::Destroy(ASTContext &Ctx) {}

ASTRecordLayout::ASTRecordLayout(const ASTContext &Ctx, CharUnits size,
                                 CharUnits alignment,
                                 CharUnits preferredAlignment,
                                 CharUnits unadjustedAlignment,
                                 CharUnits requiredAlignment,
                                 CharUnits datasize,
                                 ArrayRef<uint64_t> fieldoffsets)
    :{}

// Constructor for C++ records.
ASTRecordLayout::ASTRecordLayout(
    const ASTContext &Ctx, CharUnits size, CharUnits alignment,
    CharUnits preferredAlignment, CharUnits unadjustedAlignment,
    CharUnits requiredAlignment, bool hasOwnVFPtr, bool hasExtendableVFPtr,
    CharUnits vbptroffset, CharUnits datasize, ArrayRef<uint64_t> fieldoffsets,
    CharUnits nonvirtualsize, CharUnits nonvirtualalignment,
    CharUnits preferrednvalignment, CharUnits SizeOfLargestEmptySubobject,
    const CXXRecordDecl *PrimaryBase, bool IsPrimaryBaseVirtual,
    const CXXRecordDecl *BaseSharingVBPtr, bool EndsWithZeroSizedObject,
    bool LeadsWithZeroSizedBase, const BaseOffsetsMapTy &BaseOffsets,
    const VBaseOffsetsMapTy &VBaseOffsets)
    :{}