[PATCH] D97185: [llvm] Add assertions for the smart pointers with the possibility to be null in DWARFLinker::loadClangModule

Alexey Lapshin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Feb 27 03:32:40 PST 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGdf6fb4d392e5: [llvm] Add assertions for the smart pointers with the possibility to be null in… (authored by OikawaKirie, committed by avl).

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97185

Files:
  llvm/lib/DWARFLinker/DWARFLinker.cpp


Index: llvm/lib/DWARFLinker/DWARFLinker.cpp
===================================================================
--- llvm/lib/DWARFLinker/DWARFLinker.cpp
+++ llvm/lib/DWARFLinker/DWARFLinker.cpp
@@ -2131,6 +2131,7 @@
       Unit->markEverythingAsKept();
     }
   }
+  assert(Unit && "CompileUnit is not set!");
   if (!Unit->getOrigUnit().getUnitDIE().hasChildren())
     return Error::success();
   if (!Quiet && Options.Verbose) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D97185.326887.patch
Type: text/x-patch
Size: 433 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210227/170d5781/attachment.bin>


More information about the llvm-commits mailing list