@@ -88,32 +88,6 @@ namespace {
88
88
SmallVectorImpl<LookupResultEntry> &results) const ;
89
89
};
90
90
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
117
91
// Inputs
118
92
const DeclNameRef Name;
119
93
DeclContext *const DC;
@@ -128,12 +102,7 @@ namespace {
128
102
const Options options;
129
103
const bool isOriginallyTypeLookup;
130
104
const NLOptions baseNLOptions;
131
- // Transputs
132
- #ifndef NDEBUG
133
- InstrumentedNamedDeclConsumer Consumer;
134
- #else
135
- NamedDeclConsumer Consumer;
136
- #endif
105
+
137
106
// Outputs
138
107
SmallVectorImpl<LookupResultEntry> &Results;
139
108
size_t &IndexOfFirstOuterResult;
@@ -279,11 +248,6 @@ UnqualifiedLookupFactory::UnqualifiedLookupFactory(
279
248
options(options),
280
249
isOriginallyTypeLookup(options.contains(Flags::TypeLookup)),
281
250
baseNLOptions(computeBaseNLOptions(options, isOriginallyTypeLookup)),
282
- #ifdef NDEBUG
283
- Consumer (Name, Results, isOriginallyTypeLookup),
284
- #else
285
- Consumer (this , Name, Results, isOriginallyTypeLookup),
286
- #endif
287
251
Results(Results),
288
252
IndexOfFirstOuterResult(IndexOfFirstOuterResult)
289
253
{}
@@ -675,9 +639,6 @@ UnqualifiedLookupRequest::evaluate(Evaluator &evaluator,
675
639
}
676
640
677
641
#pragma mark debugging
678
- #ifndef NDEBUG
679
- void UnqualifiedLookupFactory::InstrumentedNamedDeclConsumer::anchor () {}
680
- #endif
681
642
682
643
void UnqualifiedLookupFactory::ResultFinderForTypeContext::dump () const {
683
644
(void )factory;
0 commit comments