[PATCH] D153942: [NFC]Fix possibly derefer nullptr in ComplexDeinterleavingPass.cpp

Wang, Xin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 28 02:49:37 PDT 2023


XinWang10 updated this revision to Diff 535304.
XinWang10 added a comment.

- add assert instead


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D153942

Files:
  llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp


Index: llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
===================================================================
--- llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
+++ llvm/lib/CodeGen/ComplexDeinterleavingPass.cpp
@@ -1046,7 +1046,7 @@
     if (!FinalNode)
       return nullptr;
   }
-
+  assert(FinalNode && "FinalNode can not be nullptr here");
   // Set the Real and Imag fields of the final node and submit it
   FinalNode->Real = Real;
   FinalNode->Imag = Imag;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153942.535304.patch
Type: text/x-patch
Size: 479 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230628/1b23f3ff/attachment.bin>


More information about the llvm-commits mailing list