[Lldb-commits] [PATCH] D10744: Fix demangling of names if required by language

Dawn Perchik dawn+llvm at burble.org
Mon Jul 6 09:34:35 PDT 2015


Do you want me to submit a new patch with the minor changes related to "Remove this and use the one that is calculated once at the top" in Mangled.cpp?  I can't fix the other things you suggested as they won't work as explained above.


================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:883
@@ -882,2 +882,3 @@
                     {
+                        LanguageType cu_language = LanguageTypeFromDWARF(die.GetAttributeValueAsUnsigned(m_dwarf2Data, this, DW_AT_language, 0));
                         Mangled mangled (ConstString(mangled_cstr), true);
----------------
clayborg wrote:
> You are accidentally taking the current DIE and thinking it is the compile unit DIE? This is wrong. You should calculate it once at the top using:
> 
> ```
>     const LanguageType cu_language = GetLanguageType();
> ```
> Then use that everywhere. So remove this line of code.
Thanks for this.  I didn't think GetLanguageType would work for some reason but it's been a while since I worked on this patch - need to have another look.

================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:906
@@ -904,2 +905,3 @@
                     {
+                        LanguageType cu_language = LanguageTypeFromDWARF(die.GetAttributeValueAsUnsigned(m_dwarf2Data, this, DW_AT_language, 0));
                         Mangled mangled (ConstString(mangled_cstr), true);
----------------
clayborg wrote:
> Remove this and use the one that is calculated once at the top.
Thanks - will do.

================
Comment at: source/Plugins/SymbolFile/DWARF/DWARFCompileUnit.cpp:954
@@ -951,2 +953,3 @@
                 {
+                    LanguageType cu_language = LanguageTypeFromDWARF(die.GetAttributeValueAsUnsigned(m_dwarf2Data, this, DW_AT_language, 0));
                     Mangled mangled (ConstString(mangled_cstr), true);
----------------
clayborg wrote:
> Remove this and use the one that is calculated once at the top.
Thanks - will do.


Repository:
  rL LLVM

http://reviews.llvm.org/D10744







More information about the lldb-commits mailing list