[cfe-commits] r68168 - /cfe/trunk/lib/CodeGen/Mangle.cpp
Anders Carlsson
andersca at mac.com
Tue Mar 31 17:42:17 PDT 2009
Author: andersca
Date: Tue Mar 31 19:42:16 2009
New Revision: 68168
URL: http://llvm.org/viewvc/llvm-project?rev=68168&view=rev
Log:
Fix a bug (that I thought I had fixed already) where mangling a prefix could get us into an infinite loop
Modified:
cfe/trunk/lib/CodeGen/Mangle.cpp
Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=68168&r1=68167&r2=68168&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Tue Mar 31 19:42:16 2009
@@ -219,8 +219,8 @@
// ::= # 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());
More information about the cfe-commits
mailing list