@@ -127,11 +127,11 @@ static std::string escape(DeclBaseName name) {
127
127
return llvm::yaml::escape (name.userFacingName ());
128
128
}
129
129
130
- static void emitProvides (const SourceFile *SF, llvm::raw_fd_ostream &out);
130
+ static void emitProvides (const SourceFile *SF, llvm::raw_ostream &out);
131
131
static void emitDepends (const SourceFile *SF,
132
132
const DependencyTracker &depTracker,
133
- llvm::raw_fd_ostream &out);
134
- static void emitInterfaceHash (SourceFile *SF, llvm::raw_fd_ostream &out);
133
+ llvm::raw_ostream &out);
134
+ static void emitInterfaceHash (SourceFile *SF, llvm::raw_ostream &out);
135
135
136
136
bool swift::emitReferenceDependencies (DiagnosticEngine &diags,
137
137
SourceFile *const SF,
@@ -164,25 +164,25 @@ bool swift::emitReferenceDependencies(DiagnosticEngine &diags,
164
164
}
165
165
166
166
static void emitProvidesTopLevelNames (
167
- const SourceFile *SF, llvm::raw_fd_ostream &out,
167
+ const SourceFile *SF, llvm::raw_ostream &out,
168
168
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
169
169
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers);
170
170
171
171
static void emitProvidesNominalTypes (
172
172
const llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
173
- llvm::raw_fd_ostream &out);
173
+ llvm::raw_ostream &out);
174
174
175
175
static void emitProvidesMembers (
176
176
const llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
177
177
const llvm::SmallVectorImpl<const ExtensionDecl *>
178
178
&extensionsWithJustMembers,
179
- llvm::raw_fd_ostream &out);
179
+ llvm::raw_ostream &out);
180
180
181
181
static void emitProvidesDynamicLookupMembers (const SourceFile *SF,
182
- llvm::raw_fd_ostream &out);
182
+ llvm::raw_ostream &out);
183
183
184
184
static void emitProvides (const SourceFile *const SF,
185
- llvm::raw_fd_ostream &out) {
185
+ llvm::raw_ostream &out) {
186
186
llvm::MapVector<const NominalTypeDecl *, bool > extendedNominals;
187
187
llvm::SmallVector<const ExtensionDecl *, 8 > extensionsWithJustMembers;
188
188
@@ -196,13 +196,13 @@ static void emitProvides(const SourceFile *const SF,
196
196
}
197
197
198
198
static void emitProvidesTopLevelDecl (
199
- const Decl *const D, llvm::raw_fd_ostream &out,
199
+ const Decl *const D, llvm::raw_ostream &out,
200
200
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
201
201
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
202
202
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers);
203
203
204
204
static void emitProvidesTopLevelNames (
205
- const SourceFile *const SF, llvm::raw_fd_ostream &out,
205
+ const SourceFile *const SF, llvm::raw_ostream &out,
206
206
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
207
207
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers) {
208
208
llvm::SmallVector<const FuncDecl *, 8 > memberOperatorDecls;
@@ -215,21 +215,21 @@ static void emitProvidesTopLevelNames(
215
215
}
216
216
217
217
static void emitProvidesExtensionDecl (
218
- const ExtensionDecl *ED, llvm::raw_fd_ostream &out,
218
+ const ExtensionDecl *ED, llvm::raw_ostream &out,
219
219
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
220
220
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
221
221
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers);
222
222
223
223
static void emitProvidesNominalTypeDecl (
224
- const NominalTypeDecl *NTD, llvm::raw_fd_ostream &out,
224
+ const NominalTypeDecl *NTD, llvm::raw_ostream &out,
225
225
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
226
226
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls);
227
227
228
228
static void emitProvidesValueDecl (const ValueDecl *VD,
229
- llvm::raw_fd_ostream &out);
229
+ llvm::raw_ostream &out);
230
230
231
231
static void emitProvidesTopLevelDecl (
232
- const Decl *const D, llvm::raw_fd_ostream &out,
232
+ const Decl *const D, llvm::raw_ostream &out,
233
233
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
234
234
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
235
235
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers) {
@@ -293,7 +293,7 @@ static void emitProvidesTopLevelDecl(
293
293
}
294
294
295
295
static void emitProvidesExtensionDecl (
296
- const ExtensionDecl *const ED, llvm::raw_fd_ostream &out,
296
+ const ExtensionDecl *const ED, llvm::raw_ostream &out,
297
297
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
298
298
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls,
299
299
llvm::SmallVectorImpl<const ExtensionDecl *> &extensionsWithJustMembers) {
@@ -322,7 +322,7 @@ static void emitProvidesExtensionDecl(
322
322
}
323
323
324
324
static void emitProvidesNominalTypeDecl (
325
- const NominalTypeDecl *const NTD, llvm::raw_fd_ostream &out,
325
+ const NominalTypeDecl *const NTD, llvm::raw_ostream &out,
326
326
llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
327
327
llvm::SmallVectorImpl<const FuncDecl *> &memberOperatorDecls) {
328
328
if (!NTD->hasName ())
@@ -337,7 +337,7 @@ static void emitProvidesNominalTypeDecl(
337
337
}
338
338
339
339
static void emitProvidesValueDecl (const ValueDecl *const VD,
340
- llvm::raw_fd_ostream &out) {
340
+ llvm::raw_ostream &out) {
341
341
if (!VD->hasName ())
342
342
return ;
343
343
if (VD->hasAccess () && VD->getFormalAccess () <= AccessLevel::FilePrivate) {
@@ -348,7 +348,7 @@ static void emitProvidesValueDecl(const ValueDecl *const VD,
348
348
349
349
static void emitProvidesNominalTypes (
350
350
const llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
351
- llvm::raw_fd_ostream &out) {
351
+ llvm::raw_ostream &out) {
352
352
out << " provides-nominal:\n " ;
353
353
for (auto entry : extendedNominals) {
354
354
if (!entry.second )
@@ -363,7 +363,7 @@ static void emitProvidesMembers(
363
363
const llvm::MapVector<const NominalTypeDecl *, bool > &extendedNominals,
364
364
const llvm::SmallVectorImpl<const ExtensionDecl *>
365
365
&extensionsWithJustMembers,
366
- llvm::raw_fd_ostream &out) {
366
+ llvm::raw_ostream &out) {
367
367
out << " provides-member:\n " ;
368
368
for (auto entry : extendedNominals) {
369
369
out << " - [\" " ;
@@ -389,7 +389,7 @@ static void emitProvidesMembers(
389
389
}
390
390
391
391
static void emitProvidesDynamicLookupMembers (const SourceFile *const SF,
392
- llvm::raw_fd_ostream &out) {
392
+ llvm::raw_ostream &out) {
393
393
if (SF->getASTContext ().LangOpts .EnableObjCInterop ) {
394
394
// FIXME: This requires a traversal of the whole file to compute.
395
395
// We should (a) see if there's a cheaper way to keep it up to date,
@@ -434,25 +434,25 @@ sortedByName(const llvm::DenseMap<DeclBaseName, bool> map) {
434
434
}
435
435
436
436
static void emitDependsTopLevelNames (const ReferencedNameTracker *tracker,
437
- llvm::raw_fd_ostream &out);
437
+ llvm::raw_ostream &out);
438
438
439
439
using TableEntryTy = std::pair<ReferencedNameTracker::MemberPair, bool >;
440
440
441
441
static void emitDependsMember (ArrayRef<TableEntryTy> sortedMembers,
442
- llvm::raw_fd_ostream &out);
442
+ llvm::raw_ostream &out);
443
443
444
444
static void emitDependsNominal (ArrayRef<TableEntryTy> sortedMembers,
445
- llvm::raw_fd_ostream &out);
445
+ llvm::raw_ostream &out);
446
446
447
447
static void emitDependsDynamicLookup (const ReferencedNameTracker *tracker,
448
- llvm::raw_fd_ostream &out);
448
+ llvm::raw_ostream &out);
449
449
450
450
static void emitDependsExternal (const DependencyTracker &depTracker,
451
- llvm::raw_fd_ostream &out);
451
+ llvm::raw_ostream &out);
452
452
453
453
static void emitDepends (const SourceFile *const SF,
454
454
const DependencyTracker &depTracker,
455
- llvm::raw_fd_ostream &out) {
455
+ llvm::raw_ostream &out) {
456
456
457
457
const ReferencedNameTracker *const tracker = SF->getReferencedNameTracker ();
458
458
assert (tracker && " Cannot emit reference dependencies without a tracker" );
@@ -490,7 +490,7 @@ static void emitDepends(const SourceFile *const SF,
490
490
}
491
491
492
492
static void emitDependsTopLevelNames (const ReferencedNameTracker *const tracker,
493
- llvm::raw_fd_ostream &out) {
493
+ llvm::raw_ostream &out) {
494
494
out << " depends-top-level:\n " ;
495
495
for (auto &entry : sortedByName (tracker->getTopLevelNames ())) {
496
496
assert (!entry.first .empty ());
@@ -502,7 +502,7 @@ static void emitDependsTopLevelNames(const ReferencedNameTracker *const tracker,
502
502
}
503
503
504
504
static void emitDependsMember (ArrayRef<TableEntryTy> sortedMembers,
505
- llvm::raw_fd_ostream &out) {
505
+ llvm::raw_ostream &out) {
506
506
out << " depends-member:\n " ;
507
507
for (auto &entry : sortedMembers) {
508
508
assert (entry.first .first != nullptr );
@@ -523,7 +523,7 @@ static void emitDependsMember(ArrayRef<TableEntryTy> sortedMembers,
523
523
}
524
524
525
525
static void emitDependsNominal (ArrayRef<TableEntryTy> sortedMembers,
526
- llvm::raw_fd_ostream &out) {
526
+ llvm::raw_ostream &out) {
527
527
out << " depends-nominal:\n " ;
528
528
for (auto i = sortedMembers.begin (), e = sortedMembers.end (); i != e; ++i) {
529
529
bool isCascading = i->second ;
@@ -546,7 +546,7 @@ static void emitDependsNominal(ArrayRef<TableEntryTy> sortedMembers,
546
546
}
547
547
548
548
static void emitDependsDynamicLookup (const ReferencedNameTracker *const tracker,
549
- llvm::raw_fd_ostream &out) {
549
+ llvm::raw_ostream &out) {
550
550
out << " depends-dynamic-lookup:\n " ;
551
551
for (auto &entry : sortedByName (tracker->getDynamicLookupNames ())) {
552
552
assert (!entry.first .empty ());
@@ -558,14 +558,14 @@ static void emitDependsDynamicLookup(const ReferencedNameTracker *const tracker,
558
558
}
559
559
560
560
static void emitDependsExternal (const DependencyTracker &depTracker,
561
- llvm::raw_fd_ostream &out) {
561
+ llvm::raw_ostream &out) {
562
562
out << " depends-external:\n " ;
563
563
for (auto &entry : reversePathSortedFilenames (depTracker.getDependencies ())) {
564
564
out << " - \" " << llvm::yaml::escape (entry) << " \"\n " ;
565
565
}
566
566
}
567
567
568
- static void emitInterfaceHash (SourceFile *const SF, llvm::raw_fd_ostream &out) {
568
+ static void emitInterfaceHash (SourceFile *const SF, llvm::raw_ostream &out) {
569
569
llvm::SmallString<32 > interfaceHash;
570
570
SF->getInterfaceHash (interfaceHash);
571
571
out << " interface-hash: \" " << interfaceHash << " \"\n " ;
0 commit comments