[cfe-commits] r84237 - in /cfe/trunk: lib/CodeGen/Mangle.cpp test/CodeGenCXX/mangle-subst.cpp

Anders Carlsson andersca at mac.com
Thu Oct 15 19:06:06 PDT 2009


Author: andersca
Date: Thu Oct 15 21:06:06 2009
New Revision: 84237

URL: http://llvm.org/viewvc/llvm-project?rev=84237&view=rev
Log:
Builtin types are subsitutable if they are qualified. Fixes PR5196.

Modified:
    cfe/trunk/lib/CodeGen/Mangle.cpp
    cfe/trunk/test/CodeGenCXX/mangle-subst.cpp

Modified: cfe/trunk/lib/CodeGen/Mangle.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/Mangle.cpp?rev=84237&r1=84236&r2=84237&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/Mangle.cpp (original)
+++ cfe/trunk/lib/CodeGen/Mangle.cpp Thu Oct 15 21:06:06 2009
@@ -705,7 +705,7 @@
   // Only operate on the canonical type!
   T = Context.getASTContext().getCanonicalType(T);
 
-  bool IsSubstitutable = !isa<BuiltinType>(T);
+  bool IsSubstitutable = T.hasQualifiers() || !isa<BuiltinType>(T);
   if (IsSubstitutable && mangleSubstitution(T))
     return;
 

Modified: cfe/trunk/test/CodeGenCXX/mangle-subst.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/mangle-subst.cpp?rev=84237&r1=84236&r2=84237&view=diff

==============================================================================
--- cfe/trunk/test/CodeGenCXX/mangle-subst.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/mangle-subst.cpp Thu Oct 15 21:06:06 2009
@@ -54,3 +54,8 @@
 // CHECK: @_ZN2NS3ft3IiEEvNS_2S1IT_EENS1_IcEE
 template void ft3<int>(S1<int>, S1<char>);
 }
+
+// PR5196
+// CHECK: @_Z1fPKcS0_
+void f(const char*, const char*) {}
+





More information about the cfe-commits mailing list