[cfe-commits] r82246 - /cfe/trunk/lib/CodeGen/Mangle.cpp
Anders Carlsson
andersca at mac.com
Fri Sep 18 11:39:58 PDT 2009
Author: andersca
Date: Fri Sep 18 13:39:58 2009
New Revision: 82246
URL: http://llvm.org/viewvc/llvm-project?rev=82246&view=rev
Log:
Change manglePrefix to return early if the DC is the translation unit.
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=82246&r1=82245&r2=82246&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Fri Sep 18 13:39:58 2009
@@ -488,11 +488,13 @@
// ::= <substitution>
// FIXME: We only handle mangling of namespaces and classes at the moment.
+ if (DC->isTranslationUnit())
+ return;
+
if (mangleSubstitution(cast<NamedDecl>(DC)))
return;
- if (!DC->getParent()->isTranslationUnit())
- manglePrefix(DC->getParent());
+ manglePrefix(DC->getParent());
if (const NamespaceDecl *Namespace = dyn_cast<NamespaceDecl>(DC))
mangleSourceName(Namespace->getIdentifier());
More information about the cfe-commits
mailing list