mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
Rename getAnalysisToUpdate to getAnalysisIfAvailable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -78,7 +78,8 @@
|
||||
<li><a href="#AU::addRequired">The <tt>AnalysisUsage::addRequired<></tt> and <tt>AnalysisUsage::addRequiredTransitive<></tt> methods</a></li>
|
||||
<li><a href="#AU::addPreserved">The <tt>AnalysisUsage::addPreserved<></tt> method</a></li>
|
||||
<li><a href="#AU::examples">Example implementations of <tt>getAnalysisUsage</tt></a></li>
|
||||
<li><a href="#getAnalysis">The <tt>getAnalysis<></tt> and <tt>getAnalysisToUpdate<></tt> methods</a></li>
|
||||
<li><a href="#getAnalysis">The <tt>getAnalysis<></tt> and
|
||||
<tt>getAnalysisIfAvailable<></tt> methods</a></li>
|
||||
</ul></li>
|
||||
<li><a href="#analysisgroup">Implementing Analysis Groups</a>
|
||||
<ul>
|
||||
@@ -1131,7 +1132,8 @@ the fact that it hacks on the CFG.
|
||||
|
||||
<!-- _______________________________________________________________________ -->
|
||||
<div class="doc_subsubsection">
|
||||
<a name="getAnalysis">The <tt>getAnalysis<></tt> and <tt>getAnalysisToUpdate<></tt> methods</a>
|
||||
<a name="getAnalysis">The <tt>getAnalysis<></tt> and
|
||||
<tt>getAnalysisIfAvailable<></tt> methods</a>
|
||||
</div>
|
||||
|
||||
<div class="doc_text">
|
||||
@@ -1173,12 +1175,12 @@ before returning a reference to the desired pass.</p>
|
||||
<p>
|
||||
If your pass is capable of updating analyses if they exist (e.g.,
|
||||
<tt>BreakCriticalEdges</tt>, as described above), you can use the
|
||||
<tt>getAnalysisToUpdate</tt> method, which returns a pointer to the analysis if
|
||||
it is active. For example:</p>
|
||||
<tt>getAnalysisIfAvailable</tt> method, which returns a pointer to the analysis
|
||||
if it is active. For example:</p>
|
||||
|
||||
<div class="doc_code"><pre>
|
||||
...
|
||||
if (DominatorSet *DS = getAnalysisToUpdate<DominatorSet>()) {
|
||||
if (DominatorSet *DS = getAnalysisIfAvailable<DominatorSet>()) {
|
||||
<i>// A DominatorSet is active. This code will update it.</i>
|
||||
}
|
||||
...
|
||||
|
Reference in New Issue
Block a user