[llvm] r298866 - Remove redundant check for nullptr.

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 27 10:36:31 PDT 2017


Author: adrian
Date: Mon Mar 27 12:36:31 2017
New Revision: 298866

URL: http://llvm.org/viewvc/llvm-project?rev=298866&view=rev
Log:
Remove redundant check for nullptr.

Modified:
    llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp

Modified: llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp?rev=298866&r1=298865&r2=298866&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp Mon Mar 27 12:36:31 2017
@@ -947,10 +947,10 @@ void CodeViewDebug::collectVariableInfo(
 
       // Handle fragments.
       auto Fragment = DIExpr->getFragmentInfo();
-      if (DIExpr && Fragment) {
+      if (Fragment) {
         IsSubfield = true;
         StructOffset = Fragment->OffsetInBits / 8;
-      } else if (DIExpr && DIExpr->getNumElements() > 0) {
+      } else if (DIExpr->getNumElements() > 0) {
         continue; // Ignore unrecognized exprs.
       }
 




More information about the llvm-commits mailing list