From 3df4cb15d74ce5f4ec0ea1877ad8c21ee6dc2b5c Mon Sep 17 00:00:00 2001 From: Philip Reames Date: Wed, 22 Aug 2018 03:32:52 +0000 Subject: [PATCH] [AST] Move a function definition into the cpp [NFC] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@340382 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/AliasSetTracker.h | 12 +----------- lib/Analysis/AliasSetTracker.cpp | 12 ++++++++++++ 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index 372c66c86c6..00dec716ed6 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -220,17 +220,7 @@ public: /// If this alias set is known to contain a single instruction and *only* a /// single unique instruction, return it. Otherwise, return nullptr. - Instruction* 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(UnknownInsts[0]); - } + Instruction* getUniqueInstruction(); void print(raw_ostream &OS) const; void dump() const; diff --git a/lib/Analysis/AliasSetTracker.cpp b/lib/Analysis/AliasSetTracker.cpp index dc6ecd58b7b..66fdf7f22f0 100644 --- a/lib/Analysis/AliasSetTracker.cpp +++ b/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(UnknownInsts[0]); +} + void AliasSetTracker::clear() { // Delete all the PointerRec entries. for (PointerMapType::iterator I = PointerMap.begin(), E = PointerMap.end();