]> granicus.if.org Git - clang/commitdiff
After some discussion, the ABI list settled on a much more sensible mangling
authorJohn McCall <rjmccall@apple.com>
Thu, 15 Jul 2010 21:53:03 +0000 (21:53 +0000)
committerJohn McCall <rjmccall@apple.com>
Thu, 15 Jul 2010 21:53:03 +0000 (21:53 +0000)
for string literals.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@108464 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/Mangle.cpp

index 30ee541c00fa03780f34a869396af9c7d431bc6d..58b0246e36381ccd5529af4b45c66e4983e804b0 100644 (file)
@@ -1974,13 +1974,10 @@ void CXXNameMangler::mangleExpression(const Expr *E) {
   }
 
   case Expr::StringLiteralClass: {
-    // Proposal from David Vandervoorde, 2010.06.30.
-    // I've sent a comment off asking whether this needs to also
-    // represent the length of the string.
+    // Revised proposal from David Vandervoorde, 2010.07.15.
     Out << 'L';
-    const ConstantArrayType *T = cast<ConstantArrayType>(E->getType());
-    QualType CharTy = T->getElementType().getUnqualifiedType();
-    mangleType(CharTy);
+    assert(isa<ConstantArrayType>(E->getType()));
+    mangleType(E->getType());
     Out << 'E';
     break;
   }