[PATCH] D85437: [DebugInfo] Fix initialization of DwarfCompileUnit::LabelBegin.
Igor Kudrin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 6 08:50:35 PDT 2020
ikudrin created this revision.
ikudrin added reviewers: dblaikie, jhenderson.
ikudrin added projects: LLVM, debug-info.
Herald added subscribers: hiraditya, aprantl.
ikudrin requested review of this revision.
This also fixes the condition in the assertion in `DwarfCompileUnit::getLabelBegin()` because it checked something unrelated to the returned value.
Repository:
rG LLVM Github Monorepo
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);
return LabelBegin;
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D85437.283623.patch
Type: text/x-patch
Size: 658 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200806/fb0b8335/attachment.bin>
More information about the llvm-commits
mailing list