[Lldb-commits] [lldb] edc3f4f - [NFC] [lldb] Unindent DWARFDebugInfoEntry::GetDWARFDeclContext

Jan Kratochvil via lldb-commits lldb-commits at lists.llvm.org
Fri Jan 31 07:51:42 PST 2020


Author: Jan Kratochvil
Date: 2020-01-31T16:51:33+01:00
New Revision: edc3f4f02e54c2ae1067f60f6a0ed6caf5b92ef6

URL: https://github.com/llvm/llvm-project/commit/edc3f4f02e54c2ae1067f60f6a0ed6caf5b92ef6
DIFF: https://github.com/llvm/llvm-project/commit/edc3f4f02e54c2ae1067f60f6a0ed6caf5b92ef6.diff

LOG: [NFC] [lldb] Unindent DWARFDebugInfoEntry::GetDWARFDeclContext

Reduce code indentation level.

Added: 
    

Modified: 
    lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
index 885ca3d32d64..5d22e3d607ac 100644
--- a/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
+++ b/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp
@@ -871,15 +871,15 @@ void DWARFDebugInfoEntry::BuildFunctionAddressRangeTable(
 void DWARFDebugInfoEntry::GetDWARFDeclContext(
     DWARFUnit *cu, DWARFDeclContext &dwarf_decl_ctx) const {
   const dw_tag_t tag = Tag();
-  if (tag != DW_TAG_compile_unit && tag != DW_TAG_partial_unit) {
-    dwarf_decl_ctx.AppendDeclContext(tag, GetName(cu));
-    DWARFDIE parent_decl_ctx_die = GetParentDeclContextDIE(cu);
-    if (parent_decl_ctx_die && parent_decl_ctx_die.GetDIE() != this) {
-      if (parent_decl_ctx_die.Tag() != DW_TAG_compile_unit &&
-          parent_decl_ctx_die.Tag() != DW_TAG_partial_unit)
-        parent_decl_ctx_die.GetDIE()->GetDWARFDeclContext(
-            parent_decl_ctx_die.GetCU(), dwarf_decl_ctx);
-    }
+  if (tag == DW_TAG_compile_unit || tag == DW_TAG_partial_unit)
+    return;
+  dwarf_decl_ctx.AppendDeclContext(tag, GetName(cu));
+  DWARFDIE parent_decl_ctx_die = GetParentDeclContextDIE(cu);
+  if (parent_decl_ctx_die && parent_decl_ctx_die.GetDIE() != this) {
+    if (parent_decl_ctx_die.Tag() != DW_TAG_compile_unit &&
+        parent_decl_ctx_die.Tag() != DW_TAG_partial_unit)
+      parent_decl_ctx_die.GetDIE()->GetDWARFDeclContext(
+          parent_decl_ctx_die.GetCU(), dwarf_decl_ctx);
   }
 }
 


        


More information about the lldb-commits mailing list