[cfe-commits] r96962 - /cfe/trunk/lib/CodeGen/Mangle.cpp

Eli Friedman eli.friedman at gmail.com
Tue Feb 23 10:25:09 PST 2010


Author: efriedma
Date: Tue Feb 23 12:25:09 2010
New Revision: 96962

URL: http://llvm.org/viewvc/llvm-project?rev=96962&view=rev
Log:
Make previous fix handle a few more edge cases.


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=96962&r1=96961&r2=96962&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Tue Feb 23 12:25:09 2010
@@ -1648,13 +1648,13 @@
 
   if (const ClassTemplateSpecializationDecl *SD =
         dyn_cast<ClassTemplateSpecializationDecl>(ND)) {
+    if (!isStdNamespace(SD->getDeclContext()))
+      return false;
+
     //    <substitution> ::= Ss # ::std::basic_string<char,
     //                            ::std::char_traits<char>,
     //                            ::std::allocator<char> >
     if (SD->getIdentifier()->isStr("basic_string")) {
-      if (!isStdNamespace(SD->getDeclContext()))
-        return false;
-
       const TemplateArgumentList &TemplateArgs = SD->getTemplateArgs();
 
       if (TemplateArgs.size() != 3)





More information about the cfe-commits mailing list