#include "clang/Frontend/LayoutOverrideSource.h"
#include "clang/AST/Decl.h"
#include "clang/AST/DeclCXX.h"
#include "clang/Basic/CharInfo.h"
#include "llvm/Support/raw_ostream.h"
#include <fstream>
#include <string>
usingnamespaceclang;
static std::string parseName(StringRef S) { … }
static bool parseUnsigned(StringRef &S, unsigned long long &ULL) { … }
LayoutOverrideSource::LayoutOverrideSource(StringRef Filename) { … }
bool
LayoutOverrideSource::layoutRecordType(const RecordDecl *Record,
uint64_t &Size, uint64_t &Alignment,
llvm::DenseMap<const FieldDecl *, uint64_t> &FieldOffsets,
llvm::DenseMap<const CXXRecordDecl *, CharUnits> &BaseOffsets,
llvm::DenseMap<const CXXRecordDecl *, CharUnits> &VirtualBaseOffsets)
{ … }
LLVM_DUMP_METHOD void LayoutOverrideSource::dump() { … }