diff options
author | Anders Carlsson <andersca@mac.com> | 2009-04-01 00:42:16 +0000 |
---|---|---|
committer | Anders Carlsson <andersca@mac.com> | 2009-04-01 00:42:16 +0000 |
commit | c8dee9ce29686d3230ecfdc651542934d1f661c8 (patch) | |
tree | e7f79268ac6809415557c5ced8178b7e7302257b /lib/CodeGen/Mangle.cpp | |
parent | 1734317845d60307d474b5da8a8d33adbaf5e723 (diff) |
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@68168 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/Mangle.cpp')
-rw-r--r-- | lib/CodeGen/Mangle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/Mangle.cpp b/lib/CodeGen/Mangle.cpp index 427cc76646..cd97b5d916 100644 --- a/lib/CodeGen/Mangle.cpp +++ b/lib/CodeGen/Mangle.cpp @@ -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()); |