forked from OSchip/llvm-project
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
llvm-svn: 68168
This commit is contained in:
parent
7f1f0b03e2
commit
12edad2c50
|
@ -219,8 +219,8 @@ void CXXNameMangler::manglePrefix(const DeclContext *DC) {
|
|||
// ::= # empty
|
||||
// ::= <substitution>
|
||||
// FIXME: We only handle mangling of namespaces and classes at the moment.
|
||||
if (DC->getParent() != DC)
|
||||
manglePrefix(DC);
|
||||
if (!DC->getParent()->isTranslationUnit())
|
||||
manglePrefix(DC->getParent());
|
||||
|
||||
if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(DC))
|
||||
mangleSourceName(Namespace->getIdentifier());
|
||||
|
|
Loading…
Reference in New Issue