Skip to content

Commit 7a77da8

Browse files
committed
[lldb] Remove unused GetAllocationStrategy function
1 parent 9405180 commit 7a77da8

File tree

5 files changed

+0
-36
lines changed

5 files changed

+0
-36
lines changed

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5529,28 +5529,6 @@ bool SwiftASTContext::GetProtocolTypeInfo(const CompilerType &type,
55295529
return false;
55305530
}
55315531

5532-
TypeSystemSwift::TypeAllocationStrategy
5533-
SwiftASTContext::GetAllocationStrategy(opaque_compiler_type_t type) {
5534-
VALID_OR_RETURN_CHECK_TYPE(type, TypeAllocationStrategy::eUnknown);
5535-
5536-
swift::Type swift_type = GetSwiftType(type);
5537-
if (!swift_type)
5538-
return TypeAllocationStrategy::eUnknown;
5539-
const swift::irgen::TypeInfo *type_info =
5540-
GetSwiftTypeInfo(swift_type.getPointer());
5541-
if (!type_info)
5542-
return TypeAllocationStrategy::eUnknown;
5543-
switch (type_info->getFixedPacking(GetIRGenModule())) {
5544-
case swift::irgen::FixedPacking::OffsetZero:
5545-
return TypeAllocationStrategy::eInline;
5546-
case swift::irgen::FixedPacking::Allocate:
5547-
return TypeAllocationStrategy::ePointer;
5548-
case swift::irgen::FixedPacking::Dynamic:
5549-
return TypeAllocationStrategy::eDynamic;
5550-
}
5551-
return TypeAllocationStrategy::eUnknown;
5552-
}
5553-
55545532
CompilerType
55555533
SwiftASTContext::GetTypeRefType(lldb::opaque_compiler_type_t type) {
55565534
return GetTypeSystemSwiftTypeRef().GetTypeFromMangledTypename(

lldb/source/Plugins/TypeSystem/Swift/SwiftASTContext.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -538,9 +538,6 @@ class SwiftASTContext : public TypeSystemSwift {
538538
static bool GetProtocolTypeInfo(const CompilerType &type,
539539
ProtocolInfo &protocol_info);
540540

541-
TypeAllocationStrategy
542-
GetAllocationStrategy(lldb::opaque_compiler_type_t type) override;
543-
544541
enum class NonTriviallyManagedReferenceStrategy {
545542
eWeak,
546543
eUnowned,

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwift.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,6 @@ class TypeSystemSwift : public TypeSystem {
127127
static CompilerType GetInstanceType(CompilerType ct);
128128
virtual CompilerType GetInstanceType(lldb::opaque_compiler_type_t type) = 0;
129129
enum class TypeAllocationStrategy { eInline, ePointer, eDynamic, eUnknown };
130-
virtual TypeAllocationStrategy
131-
GetAllocationStrategy(lldb::opaque_compiler_type_t type) = 0;
132130
struct TupleElement {
133131
ConstString element_name;
134132
CompilerType element_type;

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3123,13 +3123,6 @@ TypeSystemSwiftTypeRef::GetInstanceType(opaque_compiler_type_t type) {
31233123
(ReconstructType(type)));
31243124
}
31253125

3126-
TypeSystemSwift::TypeAllocationStrategy
3127-
TypeSystemSwiftTypeRef::GetAllocationStrategy(opaque_compiler_type_t type) {
3128-
if (auto *swift_ast_context = GetSwiftASTContext())
3129-
return swift_ast_context->GetAllocationStrategy(ReconstructType(type));
3130-
return {};
3131-
}
3132-
31333126
CompilerType TypeSystemSwiftTypeRef::CreateTupleType(
31343127
const std::vector<TupleElement> &elements) {
31353128
auto impl = [&]() -> CompilerType {

lldb/source/Plugins/TypeSystem/Swift/TypeSystemSwiftTypeRef.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,6 @@ class TypeSystemSwiftTypeRef : public TypeSystemSwift {
246246
CompilerType GetErrorType() override;
247247
CompilerType GetReferentType(lldb::opaque_compiler_type_t type) override;
248248
CompilerType GetInstanceType(lldb::opaque_compiler_type_t type) override;
249-
TypeAllocationStrategy
250-
GetAllocationStrategy(lldb::opaque_compiler_type_t type) override;
251249
CompilerType
252250
CreateTupleType(const std::vector<TupleElement> &elements) override;
253251
bool IsTupleType(lldb::opaque_compiler_type_t type) override;

0 commit comments

Comments
 (0)