[PATCH] D81631: Fix undefined behavior in Dwarf.

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 13 18:38:10 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rGfefe6a6642e4: Fix undefined behavior in DWARF emission (authored by linzj, committed by dblaikie).

Changed prior to commit:
  https://reviews.llvm.org/D81631?vs=271593&id=277632#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D81631

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


Index: llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
===================================================================
--- llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ llvm/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -325,7 +325,7 @@
   const MachineFunction *CurFn = nullptr;
 
   /// If nonnull, stores the CU in which the previous subprogram was contained.
-  const DwarfCompileUnit *PrevCU;
+  const DwarfCompileUnit *PrevCU = nullptr;
 
   /// As an optimization, there is no need to emit an entry in the directory
   /// table for the same directory as DW_AT_comp_dir.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D81631.277632.patch
Type: text/x-patch
Size: 567 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200714/a618af13/attachment.bin>


More information about the llvm-commits mailing list