diff options
-rw-r--r-- | include/llvm/Analysis/AliasAnalysis.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/Analysis/AliasAnalysis.h b/include/llvm/Analysis/AliasAnalysis.h index cae7addd3b..9b9a9e2ccb 100644 --- a/include/llvm/Analysis/AliasAnalysis.h +++ b/include/llvm/Analysis/AliasAnalysis.h @@ -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 |