[Lldb-commits] [PATCH] D48500: [DWARFASTParser] Remove special cases for `llvm-gcc`

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Aug 1 14:14:24 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL338638: [DWARFASTParser] Remove special cases for `llvm-gcc` (authored by davide, committed by ).
Herald added a subscriber: llvm-commits.

Changed prior to commit:
  https://reviews.llvm.org/D48500?vs=152523&id=158633#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D48500

Files:
  lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp


Index: lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
===================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/DWARFASTParserClang.cpp
@@ -307,14 +307,7 @@
                 decl.SetColumn(form_value.Unsigned());
                 break;
               case DW_AT_name:
-
                 type_name_cstr = form_value.AsCString();
-                // Work around a bug in llvm-gcc where they give a name to a
-                // reference type which doesn't include the "&"...
-                if (tag == DW_TAG_reference_type) {
-                  if (strchr(type_name_cstr, '&') == NULL)
-                    type_name_cstr = NULL;
-                }
                 if (type_name_cstr)
                   type_name_const_str.SetCString(type_name_cstr);
                 break;
@@ -558,16 +551,9 @@
             if (attributes.ExtractFormValueAtIndex(i, form_value)) {
               switch (attr) {
               case DW_AT_decl_file:
-                if (die.GetCU()->DW_AT_decl_file_attributes_are_invalid()) {
-                  // llvm-gcc outputs invalid DW_AT_decl_file attributes that
-                  // always point to the compile unit file, so we clear this
-                  // invalid value so that we can still unique types
-                  // efficiently.
-                  decl.SetFile(FileSpec("<invalid>", false));
-                } else
-                  decl.SetFile(
-                      sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(
-                          form_value.Unsigned()));
+                decl.SetFile(
+                   sc.comp_unit->GetSupportFiles().GetFileSpecAtIndex(
+                      form_value.Unsigned()));
                 break;
 
               case DW_AT_decl_line:
@@ -2977,15 +2963,6 @@
             class_language == eLanguageTypeObjC_plus_plus)
           accessibility = eAccessNone;
 
-        if (member_idx == 0 && !is_artificial && name &&
-            (strstr(name, "_vptr$") == name)) {
-          // Not all compilers will mark the vtable pointer member as
-          // artificial (llvm-gcc). We can't have the virtual members in our
-          // classes otherwise it throws off all child offsets since we end up
-          // having and extra pointer sized member in our class layouts.
-          is_artificial = true;
-        }
-
         // Handle static members
         if (is_external && member_byte_offset == UINT32_MAX) {
           Type *var_type = die.ResolveTypeUID(DIERef(encoding_form));


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D48500.158633.patch
Type: text/x-patch
Size: 2637 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20180801/e681b814/attachment-0001.bin>


More information about the lldb-commits mailing list