[libcxxabi] r351482 - [demangler] Support for block literals.

Erik Pilkington erik.pilkington at gmail.com
Thu Jan 17 13:37:51 PST 2019


Author: epilk
Date: Thu Jan 17 13:37:51 2019
New Revision: 351482

URL: http://llvm.org/viewvc/llvm-project?rev=351482&view=rev
Log:
[demangler] Support for block literals.

Modified:
    libcxxabi/trunk/src/demangle/ItaniumDemangle.h
    libcxxabi/trunk/test/test_demangle.pass.cpp

Modified: libcxxabi/trunk/src/demangle/ItaniumDemangle.h
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/src/demangle/ItaniumDemangle.h?rev=351482&r1=351481&r2=351482&view=diff
==============================================================================
--- libcxxabi/trunk/src/demangle/ItaniumDemangle.h (original)
+++ libcxxabi/trunk/src/demangle/ItaniumDemangle.h Thu Jan 17 13:37:51 2019
@@ -2480,6 +2480,12 @@ AbstractManglingParser<Derived, Alloc>::
       return nullptr;
     return make<ClosureTypeName>(Params, Count);
   }
+  if (consumeIf("Ub")) {
+    (void)parseNumber();
+    if (!consumeIf('_'))
+      return nullptr;
+    return make<NameType>("'block-literal'");
+  }
   return nullptr;
 }
 

Modified: libcxxabi/trunk/test/test_demangle.pass.cpp
URL: http://llvm.org/viewvc/llvm-project/libcxxabi/trunk/test/test_demangle.pass.cpp?rev=351482&r1=351481&r2=351482&view=diff
==============================================================================
--- libcxxabi/trunk/test/test_demangle.pass.cpp (original)
+++ libcxxabi/trunk/test/test_demangle.pass.cpp Thu Jan 17 13:37:51 2019
@@ -29759,6 +29759,8 @@ const char* cases[][2] =
     // Darwin adds leading underscores to symbols, just demangle them anyways.
     {"____Z3foo_block_invoke.25", "invocation function for block in foo"},
     {"__Z1fv", "f()"},
+
+    {"_Z2tfIZUb_E1SEiv", "int tf<'block-literal'::S>()"}
 };
 
 const unsigned N = sizeof(cases) / sizeof(cases[0]);




More information about the libcxx-commits mailing list