diff options
author | Philip Reames <listmail@philipreames.com> | 2018-08-22 03:32:52 +0000 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2018-08-22 03:32:52 +0000 |
commit | 825c74c241504c261b9f7fc87fbb0cf777b7e2fc (patch) | |
tree | 9809389d63ca4b8ce913f29648b2a326fc50d8b2 /llvm/lib/Analysis/AliasSetTracker.cpp | |
parent | 611d645a08d154b46d9748bab73d5cc5180a6e68 (diff) | |
download | bcm5719-llvm-825c74c241504c261b9f7fc87fbb0cf777b7e2fc.tar.gz bcm5719-llvm-825c74c241504c261b9f7fc87fbb0cf777b7e2fc.zip |
[AST] Move a function definition into the cpp [NFC]
llvm-svn: 340382
Diffstat (limited to 'llvm/lib/Analysis/AliasSetTracker.cpp')
-rw-r--r-- | llvm/lib/Analysis/AliasSetTracker.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp index dc6ecd58b7b..66fdf7f22f0 100644 --- a/llvm/lib/Analysis/AliasSetTracker.cpp +++ b/llvm/lib/Analysis/AliasSetTracker.cpp @@ -252,6 +252,18 @@ bool AliasSet::aliasesUnknownInst(const Instruction *Inst, return false; } +Instruction* AliasSet::getUniqueInstruction() { + if (size() != 0) + // Can't track source of pointer, might be many instruction + return nullptr; + if (AliasAny) + // May have collapses alias set + return nullptr; + if (1 != UnknownInsts.size()) + return nullptr; + return cast<Instruction>(UnknownInsts[0]); +} + void AliasSetTracker::clear() { // Delete all the PointerRec entries. for (PointerMapType::iterator I = PointerMap.begin(), E = PointerMap.end(); |