Skip to content

Commit dbc8d5e

Browse files
committed
DebugInfo: Remove some code for InOutType that no longer makes sense
1 parent 1955778 commit dbc8d5e

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

lib/IRGen/DebugTypeInfo.cpp

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,17 +63,11 @@ DebugTypeInfo DebugTypeInfo::getFromTypeInfo(DeclContext *DC,
6363
DebugTypeInfo DebugTypeInfo::getLocalVariable(DeclContext *DC,
6464
GenericEnvironment *GE,
6565
VarDecl *Decl, swift::Type Ty,
66-
const TypeInfo &Info,
67-
bool Unwrap) {
66+
const TypeInfo &Info) {
6867

6968
auto DeclType =
7069
Decl->hasInterfaceType() ? Decl->getInterfaceType() : Decl->getType();
7170
auto RealType = Ty;
72-
if (Unwrap) {
73-
DeclType = DeclType->getInOutObjectType();
74-
RealType = RealType->getInOutObjectType();
75-
// FIXME FIXME FIXME
76-
}
7771

7872
// DynamicSelfType is also sugar as far as debug info is concerned.
7973
auto Sugared = DeclType;

lib/IRGen/DebugTypeInfo.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,7 @@ class DebugTypeInfo {
6262
/// Create type for a local variable.
6363
static DebugTypeInfo getLocalVariable(DeclContext *DeclCtx,
6464
GenericEnvironment *GE, VarDecl *Decl,
65-
swift::Type Ty, const TypeInfo &Info,
66-
bool Unwrap);
65+
swift::Type Ty, const TypeInfo &Info);
6766
/// Create type for an artificial metadata variable.
6867
static DebugTypeInfo getMetadata(swift::Type Ty, llvm::Type *StorageTy,
6968
Size size, Alignment align);

lib/IRGen/IRGenSIL.cpp

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3671,7 +3671,7 @@ void IRGenSILFunction::visitDebugValueInst(DebugValueInst *i) {
36713671
if (VarDecl *Decl = i->getDecl()) {
36723672
DbgTy = DebugTypeInfo::getLocalVariable(
36733673
CurSILFn->getDeclContext(), CurSILFn->getGenericEnvironment(), Decl,
3674-
RealTy, getTypeInfo(SILVal->getType()), /*Unwrap=*/false);
3674+
RealTy, getTypeInfo(SILVal->getType()));
36753675
} else if (i->getFunction()->isBare() &&
36763676
!SILTy.hasArchetype() && !Name.empty()) {
36773677
// Preliminary support for .sil debug information.
@@ -3713,16 +3713,10 @@ void IRGenSILFunction::visitDebugValueAddrInst(DebugValueAddrInst *i) {
37133713
auto Addr = getLoweredAddress(SILVal).getAddress();
37143714
SILType SILTy = SILVal->getType();
37153715
auto RealType = SILTy.getASTType();
3716-
// Unwrap implicitly indirect types and types that are passed by
3717-
// reference only at the SIL level and below.
3718-
//
3719-
// FIXME: Should this check if the lowered SILType is address only
3720-
// instead? Otherwise optionals of archetypes etc will still have
3721-
// 'Unwrap' set to false.
3722-
bool Unwrap = VarInfo->Constant || SILTy.is<ArchetypeType>();
3716+
37233717
auto DbgTy = DebugTypeInfo::getLocalVariable(
37243718
CurSILFn->getDeclContext(), CurSILFn->getGenericEnvironment(), Decl,
3725-
RealType, getTypeInfo(SILVal->getType()), Unwrap);
3719+
RealType, getTypeInfo(SILVal->getType()));
37263720
bindArchetypes(DbgTy.getType());
37273721
if (!IGM.DebugInfo)
37283722
return;
@@ -4011,7 +4005,7 @@ void IRGenSILFunction::emitDebugInfoForAllocStack(AllocStackInst *i,
40114005
auto RealType = SILTy.getASTType();
40124006
auto DbgTy = DebugTypeInfo::getLocalVariable(
40134007
CurSILFn->getDeclContext(), CurSILFn->getGenericEnvironment(), Decl,
4014-
RealType, type, false);
4008+
RealType, type);
40154009

40164010
// FIXME: This is working around the inverse special case in LLDB.
40174011
if (DbgTy.isImplicitlyIndirect())
@@ -4208,7 +4202,7 @@ void IRGenSILFunction::visitAllocBoxInst(swift::AllocBoxInst *i) {
42084202
auto RealType = SILTy.getASTType();
42094203
auto DbgTy = DebugTypeInfo::getLocalVariable(
42104204
CurSILFn->getDeclContext(), CurSILFn->getGenericEnvironment(), Decl,
4211-
RealType, type, /*Unwrap=*/false);
4205+
RealType, type);
42124206

42134207
if (isInlinedGeneric(Decl, i->getDebugScope()))
42144208
return;

0 commit comments

Comments
 (0)