[PATCH] D85437: [DebugInfo] Fix initialization of DwarfCompileUnit::LabelBegin.

Igor Kudrin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 10 02:19:41 PDT 2020


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGd400606f8cb2: [DebugInfo] Fix initialization of DwarfCompileUnit::LabelBegin. (authored by ikudrin).

Changed prior to commit:
  https://reviews.llvm.org/D85437?vs=283623&id=284282#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85437/new/

https://reviews.llvm.org/D85437

Files:
  llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h


Index: llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
+++ llvm/lib/CodeGen/AsmPrinter/DwarfCompileUnit.h
@@ -57,7 +57,7 @@
   DwarfCompileUnit *Skeleton = nullptr;
 
   /// The start of the unit within its section.
-  MCSymbol *LabelBegin;
+  MCSymbol *LabelBegin = nullptr;
 
   /// The start of the unit macro info within macro section.
   MCSymbol *MacroLabelBegin;
@@ -299,7 +299,7 @@
   void addAddrTableBase();
 
   MCSymbol *getLabelBegin() const {
-    assert(getSection());
+    assert(LabelBegin && "LabelBegin is not initialized");
     return LabelBegin;
   }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85437.284282.patch
Type: text/x-patch
Size: 693 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200810/a9d5c8a7/attachment.bin>


More information about the llvm-commits mailing list