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 | 12edad2c50b7e0ae844e009c708d340376ba5636 (patch) | |
tree | 94b6c8026225e7ced59f5a2aa8f574ee7ed7446c /clang/lib/CodeGen/Mangle.cpp | |
parent | 7f1f0b03e2c317121ab659fb7eb833f733f61fdf (diff) | |
download | bcm5719-llvm-12edad2c50b7e0ae844e009c708d340376ba5636.tar.gz bcm5719-llvm-12edad2c50b7e0ae844e009c708d340376ba5636.zip |
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
llvm-svn: 68168
Diffstat (limited to 'clang/lib/CodeGen/Mangle.cpp')
-rw-r--r-- | clang/lib/CodeGen/Mangle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/Mangle.cpp b/clang/lib/CodeGen/Mangle.cpp index 427cc76646b..cd97b5d916c 100644 --- a/clang/lib/CodeGen/Mangle.cpp +++ b/clang/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()); |