[llvm] r373326 - DIExpression::createFragmentExpression - silence static analyzer DIExpression* null dereference warning with an assertion. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 1 04:25:39 PDT 2019
Author: rksimon
Date: Tue Oct 1 04:25:38 2019
New Revision: 373326
URL: http://llvm.org/viewvc/llvm-project?rev=373326&view=rev
Log:
DIExpression::createFragmentExpression - silence static analyzer DIExpression* null dereference warning with an assertion. NFCI.
Modified:
llvm/trunk/lib/IR/DebugInfoMetadata.cpp
Modified: llvm/trunk/lib/IR/DebugInfoMetadata.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/DebugInfoMetadata.cpp?rev=373326&r1=373325&r2=373326&view=diff
==============================================================================
--- llvm/trunk/lib/IR/DebugInfoMetadata.cpp (original)
+++ llvm/trunk/lib/IR/DebugInfoMetadata.cpp Tue Oct 1 04:25:38 2019
@@ -1161,6 +1161,7 @@ Optional<DIExpression *> DIExpression::c
Op.appendToVector(Ops);
}
}
+ assert(Expr && "Unknown DIExpression");
Ops.push_back(dwarf::DW_OP_LLVM_fragment);
Ops.push_back(OffsetInBits);
Ops.push_back(SizeInBits);
More information about the llvm-commits
mailing list