add some possibly bogus assertions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20665 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-03-17 20:33:27 +00:00
parent ddc77c458a
commit 1c8327bd50

View File

@ -12,6 +12,8 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Passes.h"
@ -196,6 +198,14 @@ DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
Result = ModRefResult(Result & ~Mod);
if (!N->isRead()) // We proved it was not read.
Result = ModRefResult(Result & ~Ref);
} else {
if (isa<ConstantPointerNull>(P))
Result = NoModRef;
else
assert(isa<GlobalVariable>(P) &&
cast<GlobalVariable>(P)->getType()->getElementType()->isFirstClassType() &&
"This isn't a global that DSA inconsiderately dropped "
"from the graph?");
}
return Result;
}