Update some AliasAnalysis pass docs for getAdjustedAnalysisPointer.
authorEric Christopher <echristo@gmail.com>
Thu, 22 May 2014 19:38:25 +0000 (19:38 +0000)
committerEric Christopher <echristo@gmail.com>
Thu, 22 May 2014 19:38:25 +0000 (19:38 +0000)
Patch by George Burgess.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@209467 91177308-0d34-0410-b5e6-96231b3b80d8

docs/AliasAnalysis.rst

index 3bfb0953aff2c8df55193907f9ff0a65098764ee..1cbaee703f30be47ff47ea1e3d9914d646addbce 100644 (file)
@@ -246,6 +246,20 @@ analysis run method (``run`` for a ``Pass``, ``runOnFunction`` for a
     return false;
   }
 
+Required methods to override
+----------------------------
+
+You must override the ``getAdjustedAnalysisPointer`` method on all subclasses
+of ``AliasAnalysis``. An example implementation of this method would look like:
+
+.. code-block:: c++
+
+  void *getAdjustedAnalysisPointer(const void* ID) override {
+    if (ID == &AliasAnalysis::ID)
+      return (AliasAnalysis*)this;
+    return this;
+  }
+
 Interfaces which may be specified
 ---------------------------------