#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/AliasAnalysis.h"
#include "llvm/IR/DataLayout.h"
+#include "llvm/IR/LLVMContext.h"
#include "llvm/Pass.h"
using namespace llvm;
// Note: NoAA does not call InitializeAliasAnalysis because it's
// special and does not support chaining.
DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
- DL = DLP ? &DLP->getDataLayout() : 0;
+ DL = DLP ? &DLP->getDataLayout() : nullptr;
}
AliasResult alias(const Location &LocA, const Location &LocB) override {
bool pointsToConstantMemory(const Location &Loc, bool OrLocal) override {
return false;
}
+ Location getArgLocation(ImmutableCallSite CS, unsigned ArgIdx,
+ ModRefResult &Mask) override {
+ Mask = ModRef;
+ AAMDNodes AATags;
+ CS->getAAMetadata(AATags);
+ return Location(CS.getArgument(ArgIdx), UnknownSize, AATags);
+ }
+
ModRefResult getModRefInfo(ImmutableCallSite CS,
const Location &Loc) override {
return ModRef;