Add some utility routines.

llvm-svn: 114483
This commit is contained in:
Dan Gohman 2010-09-21 21:20:13 +00:00
parent c3e4b141a3
commit b0c0eaf579
1 changed files with 12 additions and 0 deletions

View File

@ -97,6 +97,18 @@ public:
unsigned S = UnknownSize,
const MDNode *N = 0)
: Ptr(P), Size(S), TBAATag(N) {}
Location getWithNewPtr(const Value *NewPtr) const {
Location Copy(*this);
Copy.Ptr = NewPtr;
return Copy;
}
Location getWithoutTBAATag() const {
Location Copy(*this);
Copy.TBAATag = 0;
return Copy;
}
};
/// Alias analysis result - Either we know for sure that it does not alias, we