[DependenceAnalysis] Check if result of getConstantPart is null
authorBrendon Cahoon <bcahoon@codeaurora.org>
Mon, 4 Apr 2016 18:13:18 +0000 (18:13 +0000)
committerBrendon Cahoon <bcahoon@codeaurora.org>
Mon, 4 Apr 2016 18:13:18 +0000 (18:13 +0000)
commit86f783e31532767b05467e7c902ae4a029d2c68a
treebe59dd63f2ce0c79d24d25e1113878241bf4da4a
parent73900c6876ab794348e828312622bbdf536df8b4
[DependenceAnalysis] Check if result of getConstantPart is null

A seg-fault occurs due to a reference of a null pointer, which is
the value returned by getConstantPart. This function returns
null if the constant part is not found. The code that calls this
function needs to check for the null return value.

Differential Revision: http://reviews.llvm.org/D18718

llvm-svn: 265319
llvm/lib/Analysis/DependenceAnalysis.cpp
llvm/test/Analysis/DependenceAnalysis/MIVCheckConst.ll [new file with mode: 0644]