mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Start mangling names of private declarations specially.
We currently mangle private declarations exactly like public declarations, which means that private entities with the same name and same type will have the same symbol even if defined in separate files. This commit introduces a new mangling production, private-decl-name, which includes a discriminator string to identify the file a decl came from. Actually producing a unique string has not yet been implemented, nor serialization, nor lookup using such a discriminator. Part of rdar://problem/17632175. Swift SVN r21598
This commit is contained in:
@@ -1238,3 +1238,8 @@ Optional<BriefAndRawComment> ModuleFile::getCommentForDeclByUSR(StringRef USR) {
|
||||
|
||||
return *I;
|
||||
}
|
||||
|
||||
StringRef ModuleFile::getDiscriminatorForPrivateValue(const ValueDecl *D) {
|
||||
// FIXME: Actually implement this.
|
||||
return FileContext->getParentModule()->Name.str();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user