]> granicus.if.org Git - llvm/commitdiff
DIExpression::createFragmentExpression - silence static analyzer DIExpression* null...
authorSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 11:25:38 +0000 (11:25 +0000)
committerSimon Pilgrim <llvm-dev@redking.me.uk>
Tue, 1 Oct 2019 11:25:38 +0000 (11:25 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@373326 91177308-0d34-0410-b5e6-96231b3b80d8

lib/IR/DebugInfoMetadata.cpp

index 3482b6168530d8044a0eb800f9206cb443611226..2fe9d33ac763f59e08adfbcfb730fbba6f78d428 100644 (file)
@@ -1161,6 +1161,7 @@ Optional<DIExpression *> DIExpression::createFragmentExpression(
       Op.appendToVector(Ops);
     }
   }
+  assert(Expr && "Unknown DIExpression");
   Ops.push_back(dwarf::DW_OP_LLVM_fragment);
   Ops.push_back(OffsetInBits);
   Ops.push_back(SizeInBits);