fix a bogus assertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20675 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-03-18 23:18:30 +00:00
parent 0c9707a190
commit db7436aae8

View File

@ -190,7 +190,7 @@ DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
DSScalarMap &CallerSM = CallerTDGraph.getScalarMap();
DSScalarMap::iterator NI = CallerSM.find(P);
if (NI == CallerSM.end()) {
if (isa<ConstantPointerNull>(P))
if (isa<ConstantPointerNull>(P) || isa<UndefValue>(P))
Result = NoModRef; // null is never modified :)
else {
assert(isa<GlobalVariable>(P) &&