diff options
| author | Dan Gohman <gohman@apple.com> | 2010-09-21 21:20:13 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-09-21 21:20:13 +0000 |
| commit | b0c0eaf5795a6324aaf80bd9d4bd96b637b56f55 (patch) | |
| tree | df40cf52ff053c6b439e89fd78d796ad5617da45 /llvm/include | |
| parent | c3e4b141a31321d111164269c518f01e8ed8d904 (diff) | |
| download | bcm5719-llvm-b0c0eaf5795a6324aaf80bd9d4bd96b637b56f55.tar.gz bcm5719-llvm-b0c0eaf5795a6324aaf80bd9d4bd96b637b56f55.zip | |
Add some utility routines.
llvm-svn: 114483
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Analysis/AliasAnalysis.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/AliasAnalysis.h b/llvm/include/llvm/Analysis/AliasAnalysis.h index cae7addd3b0..9b9a9e2ccb6 100644 --- a/llvm/include/llvm/Analysis/AliasAnalysis.h +++ b/llvm/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 |

