//
//===----------------------------------------------------------------------===//
+#include "llvm/Constants.h"
+#include "llvm/DerivedTypes.h"
#include "llvm/Module.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/Analysis/Passes.h"
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;
}