[llvm] r340382 - [AST] Move a function definition into the cpp [NFC]

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 21 20:32:52 PDT 2018


Author: reames
Date: Tue Aug 21 20:32:52 2018
New Revision: 340382

URL: http://llvm.org/viewvc/llvm-project?rev=340382&view=rev
Log:
[AST] Move a function definition into the cpp [NFC]


Modified:
    llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
    llvm/trunk/lib/Analysis/AliasSetTracker.cpp

Modified: llvm/trunk/include/llvm/Analysis/AliasSetTracker.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/AliasSetTracker.h?rev=340382&r1=340381&r2=340382&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/AliasSetTracker.h (original)
+++ llvm/trunk/include/llvm/Analysis/AliasSetTracker.h Tue Aug 21 20:32:52 2018
@@ -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<Instruction>(UnknownInsts[0]);
-  }
+  Instruction* getUniqueInstruction();
 
   void print(raw_ostream &OS) const;
   void dump() const;

Modified: llvm/trunk/lib/Analysis/AliasSetTracker.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/AliasSetTracker.cpp?rev=340382&r1=340381&r2=340382&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/AliasSetTracker.cpp (original)
+++ llvm/trunk/lib/Analysis/AliasSetTracker.cpp Tue Aug 21 20:32:52 2018
@@ -252,6 +252,18 @@ bool AliasSet::aliasesUnknownInst(const
   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();




More information about the llvm-commits mailing list