Skip to content

Commit aa7d010

Browse files
committed
[Gardening] Remove mostly unused (but confusing) field in ResolvedCursorInfo
1 parent 0f09d41 commit aa7d010

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

include/swift/IDE/Utils.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ struct ResolvedCursorInfo {
161161
bool IsRef = true;
162162
bool IsKeywordArgument = false;
163163
Type Ty;
164-
DeclContext *DC = nullptr;
165164
Type ContainerType;
166165
Stmt *TrailingStmt = nullptr;
167166
Expr *TrailingExpr = nullptr;
@@ -187,7 +186,6 @@ struct ResolvedCursorInfo {
187186
this->ExtTyRef = ExtTyRef;
188187
this->IsRef = IsRef;
189188
this->Ty = Ty;
190-
this->DC = ValueD->getDeclContext();
191189
this->ContainerType = ContainerType;
192190
}
193191
void setModuleRef(ModuleEntity Mod) {

tools/swift-ide-test/swift-ide-test.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3293,8 +3293,8 @@ static int doPrintTypeInterface(const CompilerInvocation &InitInvok,
32933293
StreamPrinter Printer(llvm::outs());
32943294
std::string Error;
32953295
std::string TypeName;
3296-
if (printTypeInterface(SemaT.DC->getParentModule(), SemaT.Ty, Printer,
3297-
TypeName, Error)) {
3296+
if (printTypeInterface(SemaT.ValueD->getDeclContext()->getParentModule(),
3297+
SemaT.Ty, Printer, TypeName, Error)) {
32983298
llvm::errs() << Error;
32993299
return 1;
33003300
}

0 commit comments

Comments
 (0)