Mangler: Eliminate an ambiguity in the mangling of contexts.

<rdar://problem/15444866> Mangling is ambiguous -- may want prefix for functions

Swift SVN r10669
This commit is contained in:
Adrian Prantl
2013-11-23 00:56:16 +00:00
parent 8fdf6fe9e7
commit 4fc5c9637b
3 changed files with 10 additions and 1 deletions

View File

@@ -903,6 +903,14 @@ private:
return nullptr;
NodePointer demangled_ctx(nullptr);
char c = Mangled.peek();
if (c == 'F') {
Mangled.next();
demangled_ctx = Node::makeNodePointer(Node::Kind::Declaration);
if (!demangleEntity(demangled_ctx))
return NodePointer(new Node(Node::Kind::Failure, ""));
else return demangled_ctx;
}
if (isStartOfIdentifier(c) || c == 'S') {
demangled_ctx = demangleModule();
if (allow_greedy && Mangled.hasAtLeast(1) && isStartOfIdentifier(Mangled.peek()))