Skip to content

Commit 61d458c

Browse files
committed
---
yaml --- r: 348967 b: refs/heads/master c: dd33540 h: refs/heads/master i: 348965: 0b02421 348963: 2419c2e 348959: 4b99b7c
1 parent bf54a60 commit 61d458c

File tree

13 files changed

+26
-26
lines changed

13 files changed

+26
-26
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 5430ad50fa4259436a89366d8a91d63167afb6d0
2+
refs/heads/master: dd335402315147cc4a5acfd07da4459e05007bed
33
refs/heads/master-next: 203b3026584ecad859eb328b2e12490099409cd5
44
refs/tags/osx-passed: b6b74147ef8a386f532cf9357a1bde006e552c54
55
refs/tags/swift-2.2-SNAPSHOT-2015-12-01-a: 6bb18e013c2284f2b45f5f84f2df2887dc0f7dea

trunk/include/swift/AST/USRGeneration.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ bool printTypeUSR(Type Ty, raw_ostream &OS);
4040
/// \returns true if it failed, false on success.
4141
bool printDeclTypeUSR(const ValueDecl *D, raw_ostream &OS);
4242

43-
/// Prints out the USR for the given Decl.
43+
/// Prints out the USR for the given ValueDecl.
4444
/// \returns true if it failed, false on success.
45-
bool printDeclUSR(const ValueDecl *D, raw_ostream &OS);
45+
bool printValueDeclUSR(const ValueDecl *D, raw_ostream &OS);
4646

4747
/// Prints out the USR for the given ModuleEntity.
4848
/// \returns true if it failed, false on success.
@@ -57,9 +57,9 @@ bool printAccessorUSR(const AbstractStorageDecl *D, AccessorKind AccKind,
5757
/// \returns true if it failed, false on success.
5858
bool printExtensionUSR(const ExtensionDecl *ED, raw_ostream &OS);
5959

60-
/// Prints out the Decl USRs suitable for keys .swiftdoc and .swiftsourceinfo files.
60+
/// Prints out the USR for the given Decl.
6161
/// \returns true if it failed, false on success.
62-
bool printDeclUSRForModuleDoc(const Decl *D, raw_ostream &OS);
62+
bool printDeclUSR(const Decl *D, raw_ostream &OS);
6363

6464
} // namespace ide
6565
} // namespace swift

trunk/lib/AST/USRGeneration.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ bool ide::printModuleUSR(ModuleEntity Mod, raw_ostream &OS) {
279279
}
280280
}
281281

282-
bool ide::printDeclUSR(const ValueDecl *D, raw_ostream &OS) {
282+
bool ide::printValueDeclUSR(const ValueDecl *D, raw_ostream &OS) {
283283
auto result = evaluateOrDefault(D->getASTContext().evaluator,
284284
USRGenerationRequest { D },
285285
std::string());
@@ -327,25 +327,25 @@ bool ide::printExtensionUSR(const ExtensionDecl *ED, raw_ostream &OS) {
327327
for (auto D : ED->getMembers()) {
328328
if (auto VD = dyn_cast<ValueDecl>(D)) {
329329
OS << getUSRSpacePrefix() << "e:";
330-
return printDeclUSR(VD, OS);
330+
return printValueDeclUSR(VD, OS);
331331
}
332332
}
333333
OS << getUSRSpacePrefix() << "e:";
334-
printDeclUSR(nominal, OS);
334+
printValueDeclUSR(nominal, OS);
335335
for (auto Inherit : ED->getInherited()) {
336336
if (auto T = Inherit.getType()) {
337337
if (T->getAnyNominal())
338-
return printDeclUSR(T->getAnyNominal(), OS);
338+
return printValueDeclUSR(T->getAnyNominal(), OS);
339339
}
340340
}
341341
return true;
342342
}
343343

344-
bool ide::printDeclUSRForModuleDoc(const Decl *D, raw_ostream &OS) {
344+
bool ide::printDeclUSR(const Decl *D, raw_ostream &OS) {
345345
if (D->isImplicit())
346346
return true;
347347
if (auto *VD = dyn_cast<ValueDecl>(D)) {
348-
if (ide::printDeclUSR(VD, OS)) {
348+
if (ide::printValueDeclUSR(VD, OS)) {
349349
return true;
350350
}
351351
} else if (auto *ED = dyn_cast<ExtensionDecl>(D)) {

trunk/lib/IDE/CodeCompletion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ ArrayRef<StringRef> copyAssociatedUSRs(llvm::BumpPtrAllocator &Allocator,
817817
if (auto *OVD = OD.dyn_cast<const ValueDecl*>()) {
818818
if (shouldCopyAssociatedUSRForDecl(OVD)) {
819819
llvm::raw_svector_ostream OS(SS);
820-
Ignored = printDeclUSR(OVD, OS);
820+
Ignored = printValueDeclUSR(OVD, OS);
821821
}
822822
} else if (auto *OND = OD.dyn_cast<const clang::NamedDecl*>()) {
823823
Ignored = clang::index::generateUSRForDecl(OND, SS);

trunk/lib/IDE/CommentConversion.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ void CommentToXMLConverter::visitDocComment(const DocComment *DC) {
346346
bool Failed;
347347
{
348348
llvm::raw_svector_ostream OS(SS);
349-
Failed = ide::printDeclUSR(VD, OS);
349+
Failed = ide::printValueDeclUSR(VD, OS);
350350
}
351351
if (!Failed && !SS.empty()) {
352352
OS << "<USR>" << SS << "</USR>";

trunk/lib/IDE/Refactoring.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -545,7 +545,7 @@ class RenameRangeCollector : public IndexDataConsumer {
545545
RenameRangeCollector(const ValueDecl *D, StringRef newName)
546546
: newName(newName.str()) {
547547
llvm::raw_string_ostream OS(USR);
548-
printDeclUSR(D, OS);
548+
printValueDeclUSR(D, OS);
549549
}
550550

551551
ArrayRef<RenameLoc> results() const { return locations; }

trunk/lib/Index/Index.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ class IndexSwiftASTWalker : public SourceEntityWalker {
183183
if (ide::printExtensionUSR(ExtD, OS))
184184
return true;
185185
} else {
186-
if (ide::printDeclUSR(D, OS))
186+
if (ide::printValueDeclUSR(D, OS))
187187
return true;
188188
}
189189
result.USR = stringStorage.copyString(OS.str());

trunk/lib/Migrator/APIDiffMigratorPass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
291291
auto addDiffItems = [&](ValueDecl *VD) {
292292
llvm::SmallString<64> Buffer;
293293
llvm::raw_svector_ostream OS(Buffer);
294-
if (swift::ide::printDeclUSR(VD, OS))
294+
if (swift::ide::printValueDeclUSR(VD, OS))
295295
return;
296296
auto Items = DiffStore.getDiffItems(Buffer.str());
297297
results.insert(results.end(), Items.begin(), Items.end());
@@ -1384,7 +1384,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
13841384
auto *OD = AFD->getOverriddenDecl();
13851385
llvm::SmallString<64> Buffer;
13861386
llvm::raw_svector_ostream OS(Buffer);
1387-
if (swift::ide::printDeclUSR(OD, OS))
1387+
if (swift::ide::printValueDeclUSR(OD, OS))
13881388
return SourceLoc();
13891389
return OverridingRemoveNames.find(OS.str()) == OverridingRemoveNames.end() ?
13901390
SourceLoc() : OverrideLoc;
@@ -1406,7 +1406,7 @@ struct APIDiffMigratorPass : public ASTMigratorPass, public SourceEntityWalker {
14061406
llvm::SmallString<64> Buffer;
14071407
llvm::raw_svector_ostream OS(Buffer);
14081408
auto *RD = DSC->getFn()->getReferencedDecl().getDecl();
1409-
if (swift::ide::printDeclUSR(RD, OS))
1409+
if (swift::ide::printValueDeclUSR(RD, OS))
14101410
return false;
14111411
return USRs.find(OS.str()) != USRs.end();
14121412
}

trunk/lib/Serialization/ModuleFile.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2358,7 +2358,7 @@ Optional<CommentInfo> ModuleFile::getCommentForDecl(const Decl *D) const {
23582358
// Compute the USR.
23592359
llvm::SmallString<128> USRBuffer;
23602360
llvm::raw_svector_ostream OS(USRBuffer);
2361-
if (ide::printDeclUSRForModuleDoc(D, OS))
2361+
if (ide::printDeclUSR(D, OS))
23622362
return None;
23632363

23642364
return getCommentForDeclByUSR(USRBuffer.str());
@@ -2378,7 +2378,7 @@ Optional<BasicDeclLocs> ModuleFile::getBasicDeclLocsForDecl(const Decl *D) const
23782378
// Compute the USR.
23792379
llvm::SmallString<128> USRBuffer;
23802380
llvm::raw_svector_ostream OS(USRBuffer);
2381-
if (ide::printDeclUSRForModuleDoc(D, OS))
2381+
if (ide::printDeclUSR(D, OS))
23822382
return None;
23832383

23842384
auto It = DeclUSRsTable->find(OS.str());

trunk/lib/Serialization/SerializeDoc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ static void writeDeclCommentTable(
417417
{
418418
USRBuffer.clear();
419419
llvm::raw_svector_ostream OS(USRBuffer);
420-
if (ide::printDeclUSR(VD, OS))
420+
if (ide::printValueDeclUSR(VD, OS))
421421
return true;
422422
}
423423

@@ -628,7 +628,7 @@ writer.write<uint32_t>(data.X.Column);
628628
Optional<uint32_t> calculateUSRId(Decl *D) {
629629
llvm::SmallString<512> Buffer;
630630
llvm::raw_svector_ostream OS(Buffer);
631-
if (ide::printDeclUSRForModuleDoc(D, OS))
631+
if (ide::printDeclUSR(D, OS))
632632
return None;
633633
return USRWriter.getNewUSRID(OS.str());
634634
}

trunk/tools/SourceKit/lib/SwiftLang/SwiftLangSupport.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -829,7 +829,7 @@ bool SwiftLangSupport::printDisplayName(const swift::ValueDecl *D,
829829
}
830830

831831
bool SwiftLangSupport::printUSR(const ValueDecl *D, llvm::raw_ostream &OS) {
832-
return ide::printDeclUSR(D, OS);
832+
return ide::printValueDeclUSR(D, OS);
833833
}
834834

835835
bool SwiftLangSupport::printDeclTypeUSR(const ValueDecl *D, llvm::raw_ostream &OS) {

trunk/tools/swift-api-digester/ModuleAnalyzerNodes.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -983,7 +983,7 @@ static StringRef getTypeName(SDKContext &Ctx, Type Ty,
983983
static StringRef calculateUsr(SDKContext &Ctx, ValueDecl *VD) {
984984
llvm::SmallString<64> SS;
985985
llvm::raw_svector_ostream OS(SS);
986-
if (!ide::printDeclUSR(VD, OS)) {
986+
if (!ide::printValueDeclUSR(VD, OS)) {
987987
return Ctx.buffer(SS.str());
988988
}
989989
return StringRef();

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2819,7 +2819,7 @@ class USRPrinter : public SourceEntityWalker {
28192819
void printUSR(const ValueDecl *VD, SourceLoc Loc) {
28202820
printLoc(Loc);
28212821
OS << ' ';
2822-
if (ide::printDeclUSR(VD, OS))
2822+
if (ide::printValueDeclUSR(VD, OS))
28232823
OS << "ERROR:no-usr";
28242824
OS << '\n';
28252825
}
@@ -2905,7 +2905,7 @@ class TypeReconstructWalker : public SourceEntityWalker {
29052905
std::string USR;
29062906
{
29072907
llvm::raw_string_ostream OS(USR);
2908-
printDeclUSR(VD, OS);
2908+
printValueDeclUSR(VD, OS);
29092909
}
29102910

29112911
std::string error;

0 commit comments

Comments
 (0)