[llvm-bugs] [Bug 49186] New: ItaniumDemangler failure on clang generated mangling

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Feb 15 01:27:46 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49186

            Bug ID: 49186
           Summary: ItaniumDemangler failure on clang generated mangling
           Product: new-bugs
           Version: 10.0
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: carlo at leaningtech.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

Created attachment 24527
  --> https://bugs.llvm.org/attachment.cgi?id=24527&action=edit
Reduced test case

The easier way to reproduce is:

c++filt _ZN9SomeClassI9SomeOtherI4TypeLS1_n1EEEC2Ev
  -> SomeClass<SomeOther<Type, (Type)-1> >::SomeClass()

llvm-cxxfilt _ZN9SomeClassI9SomeOtherI4TypeLS1_n1EEEC2Ev
  -> _ZN9SomeClassI9SomeOtherI4TypeLS1_n1EEEC2Ev

So llvm-cxxfilt (that underneath calls llvm/lib/Demangle/ItaniumDemangler.cpp's
partial_demangle) is not able to demangle the relevant mangled name.

Then:
clang++ error_demangler.cpp -S -emit-llvm

and checking the generated error_demangler.ll it will show
_ZN9SomeClassI9SomeOtherI4TypeLS1_n1EEEC2Ev as a mangled name generated by
clang.



The problem arose during in the development of Cheerp, a JavaScript backend for
LLVM. Currently we have a work around, but it would be easier if the mangling
produced by clang is always demangleable by llvm.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210215/872a3799/attachment.html>


More information about the llvm-bugs mailing list