Skip to content

[cxx-interop] Rename ClangRecordTypeInfo -> LoadableClangRecordTypeInfo. #33077

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions lib/IRGen/GenStruct.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ using namespace irgen;
enum class StructTypeInfoKind {
LoadableStructTypeInfo,
FixedStructTypeInfo,
ClangRecordTypeInfo,
LoadableClangRecordTypeInfo,
NonFixedStructTypeInfo,
ResilientStructTypeInfo
};
Expand Down Expand Up @@ -292,17 +292,17 @@ namespace {
};

/// A type implementation for loadable record types imported from Clang.
class ClangRecordTypeInfo final :
public StructTypeInfoBase<ClangRecordTypeInfo, LoadableTypeInfo,
class LoadableClangRecordTypeInfo final :
public StructTypeInfoBase<LoadableClangRecordTypeInfo, LoadableTypeInfo,
ClangFieldInfo> {
const clang::RecordDecl *ClangDecl;
public:
ClangRecordTypeInfo(ArrayRef<ClangFieldInfo> fields,
LoadableClangRecordTypeInfo(ArrayRef<ClangFieldInfo> fields,
unsigned explosionSize,
llvm::Type *storageType, Size size,
SpareBitVector &&spareBits, Alignment align,
const clang::RecordDecl *clangDecl)
: StructTypeInfoBase(StructTypeInfoKind::ClangRecordTypeInfo,
: StructTypeInfoBase(StructTypeInfoKind::LoadableClangRecordTypeInfo,
fields, explosionSize,
storageType, size, std::move(spareBits),
align, IsPOD, IsFixedSize),
Expand All @@ -318,7 +318,7 @@ namespace {
void initializeFromParams(IRGenFunction &IGF, Explosion &params,
Address addr, SILType T,
bool isOutlined) const override {
ClangRecordTypeInfo::initialize(IGF, params, addr, isOutlined);
LoadableClangRecordTypeInfo::initialize(IGF, params, addr, isOutlined);
}

void addToAggLowering(IRGenModule &IGM, SwiftAggLowering &lowering,
Expand Down Expand Up @@ -680,7 +680,7 @@ class ClangRecordLowering {

const TypeInfo *createTypeInfo(llvm::StructType *llvmType) {
llvmType->setBody(LLVMFields, /*packed*/ true);
return ClangRecordTypeInfo::create(FieldInfos, NextExplosionIndex,
return LoadableClangRecordTypeInfo::create(FieldInfos, NextExplosionIndex,
llvmType, TotalStride,
std::move(SpareBits), TotalAlignment,
ClangDecl);
Expand Down Expand Up @@ -865,8 +865,8 @@ class ClangRecordLowering {
#define FOR_STRUCT_IMPL(IGF, type, op, ...) do { \
auto &structTI = IGF.getTypeInfo(type); \
switch (getStructTypeInfoKind(structTI)) { \
case StructTypeInfoKind::ClangRecordTypeInfo: \
return structTI.as<ClangRecordTypeInfo>().op(IGF, __VA_ARGS__); \
case StructTypeInfoKind::LoadableClangRecordTypeInfo: \
return structTI.as<LoadableClangRecordTypeInfo>().op(IGF, __VA_ARGS__); \
case StructTypeInfoKind::LoadableStructTypeInfo: \
return structTI.as<LoadableStructTypeInfo>().op(IGF, __VA_ARGS__); \
case StructTypeInfoKind::FixedStructTypeInfo: \
Expand Down