Skip to content

Commit dec9bf6

Browse files
committed
AST: Remove unused UnqualifiedLookupFactory::Consumer field
1 parent e903630 commit dec9bf6

File tree

1 file changed

+1
-40
lines changed

1 file changed

+1
-40
lines changed

lib/AST/UnqualifiedLookup.cpp

Lines changed: 1 addition & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -88,32 +88,6 @@ namespace {
8888
SmallVectorImpl<LookupResultEntry> &results) const;
8989
};
9090

91-
enum class AddGenericParameters { Yes, No };
92-
93-
#ifndef NDEBUG
94-
/// A consumer for debugging that lets the UnqualifiedLookupFactory know when
95-
/// finding something.
96-
class InstrumentedNamedDeclConsumer : public NamedDeclConsumer {
97-
virtual void anchor() override;
98-
UnqualifiedLookupFactory *factory;
99-
100-
public:
101-
InstrumentedNamedDeclConsumer(UnqualifiedLookupFactory *factory,
102-
DeclNameRef name,
103-
SmallVectorImpl<LookupResultEntry> &results,
104-
bool isTypeLookup)
105-
: NamedDeclConsumer(name, results, isTypeLookup), factory(factory) {}
106-
107-
virtual void foundDecl(ValueDecl *VD, DeclVisibilityKind Reason,
108-
DynamicLookupInfo dynamicLookupInfo = {}) override {
109-
unsigned before = results.size();
110-
NamedDeclConsumer::foundDecl(VD, Reason, dynamicLookupInfo);
111-
unsigned after = results.size();
112-
if (after > before)
113-
factory->addedResult(results.back());
114-
}
115-
};
116-
#endif
11791
// Inputs
11892
const DeclNameRef Name;
11993
DeclContext *const DC;
@@ -128,12 +102,7 @@ namespace {
128102
const Options options;
129103
const bool isOriginallyTypeLookup;
130104
const NLOptions baseNLOptions;
131-
// Transputs
132-
#ifndef NDEBUG
133-
InstrumentedNamedDeclConsumer Consumer;
134-
#else
135-
NamedDeclConsumer Consumer;
136-
#endif
105+
137106
// Outputs
138107
SmallVectorImpl<LookupResultEntry> &Results;
139108
size_t &IndexOfFirstOuterResult;
@@ -279,11 +248,6 @@ UnqualifiedLookupFactory::UnqualifiedLookupFactory(
279248
options(options),
280249
isOriginallyTypeLookup(options.contains(Flags::TypeLookup)),
281250
baseNLOptions(computeBaseNLOptions(options, isOriginallyTypeLookup)),
282-
#ifdef NDEBUG
283-
Consumer(Name, Results, isOriginallyTypeLookup),
284-
#else
285-
Consumer(this, Name, Results, isOriginallyTypeLookup),
286-
#endif
287251
Results(Results),
288252
IndexOfFirstOuterResult(IndexOfFirstOuterResult)
289253
{}
@@ -675,9 +639,6 @@ UnqualifiedLookupRequest::evaluate(Evaluator &evaluator,
675639
}
676640

677641
#pragma mark debugging
678-
#ifndef NDEBUG
679-
void UnqualifiedLookupFactory::InstrumentedNamedDeclConsumer::anchor() {}
680-
#endif
681642

682643
void UnqualifiedLookupFactory::ResultFinderForTypeContext::dump() const {
683644
(void)factory;

0 commit comments

Comments
 (0)