mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 06:30:39 +00:00
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:
parent
ddc77c458a
commit
1c8327bd50
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user