svf-tools 1.0.366 → 1.0.370
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/SVF-doxygen/html/html/AndersenStat_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ConsG_8cpp_source.html +6 -6
- package/SVF-doxygen/html/html/ConsG_8h_source.html +2 -2
- package/SVF-doxygen/html/html/DDAClient_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/DDAClient_8h_source.html +1 -1
- package/SVF-doxygen/html/html/DDAPass_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/ExtAPI_8h_source.html +2 -2
- package/SVF-doxygen/html/html/Graph2Json_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/ICFGBuilder_8cpp_source.html +8 -6
- package/SVF-doxygen/html/html/ICFGBuilder_8h_source.html +4 -4
- package/SVF-doxygen/html/html/ICFGEdge_8h_source.html +26 -24
- package/SVF-doxygen/html/html/ICFG_8cpp_source.html +6 -5
- package/SVF-doxygen/html/html/ICFG_8h_source.html +3 -2
- package/SVF-doxygen/html/html/IRAnnotator_8h_source.html +1 -1
- package/SVF-doxygen/html/html/IRGraph_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MTAAnnotator_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/MemRegion_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/PAGBuilderFromFile_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8cpp_source.html +2 -2
- package/SVF-doxygen/html/html/PointerAnalysisImpl_8h_source.html +1 -1
- package/SVF-doxygen/html/html/PointerAnalysis_8h_source.html +2 -2
- package/SVF-doxygen/html/html/SVFIRBuilder_8cpp_source.html +10 -6
- package/SVF-doxygen/html/html/SVFIRBuilder_8h_source.html +52 -48
- package/SVF-doxygen/html/html/SVFIR_8cpp_source.html +45 -41
- package/SVF-doxygen/html/html/SVFIR_8h_source.html +42 -40
- package/SVF-doxygen/html/html/SVFStatements_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/SVFStatements_8h_source.html +104 -98
- package/SVF-doxygen/html/html/SaberSVFGBuilder_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/TypeBasedHeapCloning_8cpp_source.html +1 -1
- package/SVF-doxygen/html/html/VFGNode_8h_source.html +6 -6
- package/SVF-doxygen/html/html/VFG_8cpp_source.html +14 -14
- package/SVF-doxygen/html/html/VFG_8h_source.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1AndersenStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1BVDataPTAImpl.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt-members.html +42 -43
- package/SVF-doxygen/html/html/classSVF_1_1BinaryOPStmt.html +15 -18
- package/SVF-doxygen/html/html/classSVF_1_1BranchStmt.html +31 -31
- package/SVF-doxygen/html/html/classSVF_1_1BranchVFGNode.html +3 -3
- package/SVF-doxygen/html/html/classSVF_1_1CallCFGEdge.html +13 -13
- package/SVF-doxygen/html/html/classSVF_1_1CallPE-members.html +24 -22
- package/SVF-doxygen/html/html/classSVF_1_1CallPE.html +91 -27
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt-members.html +42 -43
- package/SVF-doxygen/html/html/classSVF_1_1CmpStmt.html +16 -19
- package/SVF-doxygen/html/html/classSVF_1_1CondPTAImpl.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ConstraintGraph.html +8 -8
- package/SVF-doxygen/html/html/classSVF_1_1DDAClient.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1DDAPass.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1ExtAPI.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1FlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFG.html +10 -10
- package/SVF-doxygen/html/html/classSVF_1_1ICFGBuilder.html +21 -16
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter-members.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1ICFGPrinter.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge-members.html +27 -26
- package/SVF-doxygen/html/html/classSVF_1_1IntraCFGEdge.html +120 -81
- package/SVF-doxygen/html/html/classSVF_1_1MRGenerator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MTAAnnotator.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt-members.html +45 -46
- package/SVF-doxygen/html/html/classSVF_1_1MultiOpndStmt.html +25 -63
- package/SVF-doxygen/html/html/classSVF_1_1PAGBuilderFromFile.html +9 -9
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt-members.html +47 -48
- package/SVF-doxygen/html/html/classSVF_1_1PhiStmt.html +34 -35
- package/SVF-doxygen/html/html/classSVF_1_1PointerAnalysis.html +2 -2
- package/SVF-doxygen/html/html/classSVF_1_1RetCFGEdge.html +14 -14
- package/SVF-doxygen/html/html/classSVF_1_1RetPE-members.html +23 -21
- package/SVF-doxygen/html/html/classSVF_1_1RetPE.html +93 -27
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFIR.html +135 -110
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder-members.html +4 -4
- package/SVF-doxygen/html/html/classSVF_1_1SVFIRBuilder.html +177 -139
- package/SVF-doxygen/html/html/classSVF_1_1SaberSVFGBuilder.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt-members.html +44 -45
- package/SVF-doxygen/html/html/classSVF_1_1SelectStmt.html +21 -24
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE-members.html +42 -41
- package/SVF-doxygen/html/html/classSVF_1_1TDForkPE.html +28 -19
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE-members.html +42 -41
- package/SVF-doxygen/html/html/classSVF_1_1TDJoinPE.html +27 -19
- package/SVF-doxygen/html/html/classSVF_1_1TypeBasedHeapCloning.html +1 -1
- package/SVF-doxygen/html/html/classSVF_1_1UnaryOPStmt.html +20 -20
- package/SVF-doxygen/html/html/classSVF_1_1VFG.html +16 -16
- package/SVF-doxygen/html/html/classSVF_1_1VersionedFlowSensitiveStat.html +1 -1
- package/SVF-doxygen/html/html/functions_a.html +9 -9
- package/SVF-doxygen/html/html/functions_b.html +7 -12
- package/SVF-doxygen/html/html/functions_c.html +30 -23
- package/SVF-doxygen/html/html/functions_e.html +6 -2
- package/SVF-doxygen/html/html/functions_func.html +9 -9
- package/SVF-doxygen/html/html/functions_func_c.html +1 -1
- package/SVF-doxygen/html/html/functions_func_g.html +18 -20
- package/SVF-doxygen/html/html/functions_func_r.html +1 -1
- package/SVF-doxygen/html/html/functions_func_s.html +2 -2
- package/SVF-doxygen/html/html/functions_g.html +20 -22
- package/SVF-doxygen/html/html/functions_i.html +11 -13
- package/SVF-doxygen/html/html/functions_l.html +3 -3
- package/SVF-doxygen/html/html/functions_m.html +1 -1
- package/SVF-doxygen/html/html/functions_n.html +4 -4
- package/SVF-doxygen/html/html/functions_o.html +3 -3
- package/SVF-doxygen/html/html/functions_p.html +9 -9
- package/SVF-doxygen/html/html/functions_r.html +3 -5
- package/SVF-doxygen/html/html/functions_s.html +20 -22
- package/SVF-doxygen/html/html/functions_t.html +5 -5
- package/SVF-doxygen/html/html/functions_type_b.html +0 -3
- package/SVF-doxygen/html/html/functions_v.html +6 -6
- package/SVF-doxygen/html/html/functions_vars_b.html +2 -2
- package/SVF-doxygen/html/html/functions_vars_c.html +7 -0
- package/SVF-doxygen/html/html/functions_vars_e.html +4 -0
- package/SVF-doxygen/html/html/functions_vars_i.html +1 -3
- package/SVF-doxygen/html/html/functions_w.html +5 -9
- package/SVF-doxygen/html/html/search/all_1.js +9 -9
- package/SVF-doxygen/html/html/search/all_10.js +5 -5
- package/SVF-doxygen/html/html/search/all_12.js +3 -3
- package/SVF-doxygen/html/html/search/all_13.js +8 -8
- package/SVF-doxygen/html/html/search/all_14.js +6 -6
- package/SVF-doxygen/html/html/search/all_15.js +1 -1
- package/SVF-doxygen/html/html/search/all_16.js +3 -3
- package/SVF-doxygen/html/html/search/all_17.js +1 -1
- package/SVF-doxygen/html/html/search/all_2.js +2 -3
- package/SVF-doxygen/html/html/search/all_3.js +3 -2
- package/SVF-doxygen/html/html/search/all_5.js +2 -2
- package/SVF-doxygen/html/html/search/all_7.js +5 -7
- package/SVF-doxygen/html/html/search/all_9.js +2 -2
- package/SVF-doxygen/html/html/search/all_c.js +2 -2
- package/SVF-doxygen/html/html/search/all_d.js +2 -2
- package/SVF-doxygen/html/html/search/all_e.js +2 -2
- package/SVF-doxygen/html/html/search/all_f.js +1 -1
- package/SVF-doxygen/html/html/search/functions_0.js +9 -9
- package/SVF-doxygen/html/html/search/functions_10.js +1 -1
- package/SVF-doxygen/html/html/search/functions_11.js +2 -2
- package/SVF-doxygen/html/html/search/functions_2.js +1 -1
- package/SVF-doxygen/html/html/search/functions_6.js +5 -7
- package/SVF-doxygen/html/html/search/functions_f.js +1 -1
- package/SVF-doxygen/html/html/search/typedefs_1.js +0 -1
- package/SVF-doxygen/html/html/search/variables_14.js +2 -2
- package/SVF-doxygen/html/html/search/variables_15.js +1 -1
- package/SVF-doxygen/html/html/search/variables_2.js +1 -1
- package/SVF-doxygen/html/html/search/variables_3.js +2 -0
- package/SVF-doxygen/html/html/search/variables_5.js +2 -1
- package/SVF-doxygen/html/html/search/variables_9.js +1 -1
- package/SVF-doxygen/html/html/search/variables_d.js +1 -1
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01ICFG_01_5_01_4.html +2 -2
- package/SVF-doxygen/html/html/structllvm_1_1DOTGraphTraits_3_01IRGraph_01_5_01_4.html +1 -1
- package/include/Graphs/ICFG.h +1 -1
- package/include/Graphs/ICFGEdge.h +17 -14
- package/include/MemoryModel/SVFIR.h +4 -4
- package/include/MemoryModel/SVFStatements.h +26 -25
- package/include/SVF-FE/SVFIRBuilder.h +11 -9
- package/include/Util/ExtAPI.h +1 -1
- package/lib/Graphs/ICFG.cpp +4 -4
- package/lib/MemoryModel/PAGBuilderFromFile.cpp +2 -2
- package/lib/MemoryModel/SVFIR.cpp +10 -9
- package/lib/MemoryModel/SVFStatements.cpp +6 -6
- package/lib/SVF-FE/ICFGBuilder.cpp +8 -3
- package/lib/SVF-FE/SVFIRBuilder.cpp +14 -9
- package/lib/Util/ExtAPI.cpp +0 -1
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ $(function() {
|
|
|
66
66
|
<div class="title">ExtAPI.h</div> </div>
|
|
67
67
|
</div><!--header-->
|
|
68
68
|
<div class="contents">
|
|
69
|
-
<a href="ExtAPI_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* [ExtAPI.h] Info about external llvm::Functions</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * v. 005, 2008-08-15</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *------------------------------------------------------------------------------</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Copyright 2008 Andrey Petrov</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * - apetrov87@gmail.com, apetrov@cs.utexas.edu</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * obtaining a copy of this software and associated documentation</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * files (the "Software"), to deal in the Software without</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * restriction, including without limitation the rights to use, copy,</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * modify, merge, publish, distribute, sublicense, and/or sell copies</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * The above copyright notice and this permission notice shall be</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * included in all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> *------------------------------------------------------------------------------</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">/*</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * Modified by Yulei Sui 2013</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">*/</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#ifndef __ExtAPI_H</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#define __ExtAPI_H</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "<a class="code" href="BasicTypes_8h.html">Util/BasicTypes.h</a>"</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <set></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">namespace </span><a class="code" href="namespaceSVF.html">SVF</a></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">//------------------------------------------------------------------------------</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html"> 45</a></span> <span class="keyword">class </span><a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="comment">//External Function types</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">//Assume a call in the form LHS= F(arg0, arg1, arg2, arg3).</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094"> 50</a></span>  <span class="keyword">enum</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef"> 52</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a>= 0, <span class="comment">//no effect on pointers</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4"> 53</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a>, <span class="comment">//returns a ptr to a newly allocated object</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c"> 54</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a>, <span class="comment">//like L_A0 if arg0 is a non-null ptr, else ALLOC</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73"> 55</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>, <span class="comment">//free memory arg0 and all pointers passing into free function</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0"> 56</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>, <span class="comment">//like ALLOC but only allocates non-struct data</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0"> 57</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0">EFT_STAT</a>, <span class="comment">//retval points to an unknown static var X</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22"> 58</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>, <span class="comment">//ret -> X -> Y (X, Y - external static vars)</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96"> 59</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96">EFT_L_A0</a>, <span class="comment">//copies arg0, arg1, or arg2 into LHS</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aec63c85b24133af679d60dda42ab44ab"> 60</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aec63c85b24133af679d60dda42ab44ab">EFT_L_A1</a>,</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac078d0307bec384b6df3da561045ff7d"> 61</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac078d0307bec384b6df3da561045ff7d">EFT_L_A2</a>,</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1e119ad93f66dbbf8014917febad843c"> 62</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1e119ad93f66dbbf8014917febad843c">EFT_L_A8</a>,</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aa0cecd43037de38c00ec6017b03bbb3f"> 63</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aa0cecd43037de38c00ec6017b03bbb3f">EFT_L_A0__A0R_A1</a>, <span class="comment">//stores arg1 into *arg0 and returns arg0 (currently only for memset)</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a54aa3d7051aab7d65ee1154538bfbb48"> 64</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a54aa3d7051aab7d65ee1154538bfbb48">EFT_L_A0__A0R_A1R</a>, <span class="comment">//copies the data that arg1 points to into the location</span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a80ea82d0181911894919c181eb1f4e35"> 65</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a80ea82d0181911894919c181eb1f4e35">EFT_L_A1__FunPtr</a>, <span class="comment">//obtain the address of a symbol based on the arg1 (char*) and parse a function to LHS (e.g., void *dlsym(void *handle, char *funname);)</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// arg0 points to; note that several fields may be</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">// copied at once if both point to structs.</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="comment">// Returns arg0.</span></div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae7e7e0702f480304f4afefa96f6c5002"> 69</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae7e7e0702f480304f4afefa96f6c5002">EFT_A1R_A0R</a>, <span class="comment">//copies *arg0 into *arg1, with non-ptr return</span></div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4ba81144ee1a70785fbf83ca5f0d4573"> 70</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4ba81144ee1a70785fbf83ca5f0d4573">EFT_A3R_A1R_NS</a>, <span class="comment">//copies *arg1 into *arg3 (non-struct copy only)</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4c1361546aa103c26b11b0b89dc8d482"> 71</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4c1361546aa103c26b11b0b89dc8d482">EFT_A1R_A0</a>, <span class="comment">//stores arg0 into *arg1</span></div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ab8814290c2362cd812a7783802eb209a"> 72</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ab8814290c2362cd812a7783802eb209a">EFT_A2R_A1</a>, <span class="comment">//stores arg1 into *arg2</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d"> 73</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d">EFT_A4R_A1</a>, <span class="comment">//stores arg1 into *arg4</span></div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4"> 74</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4">EFT_L_A0__A2R_A0</a>, <span class="comment">//stores arg0 into *arg2 and returns it</span></div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aac3eaaf0865895ce144c035e429166be"> 75</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aac3eaaf0865895ce144c035e429166be">EFT_L_A0__A1_A0</a>, <span class="comment">//store arg1 into arg0's base and returns arg0</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899"> 76</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a>, <span class="comment">//stores a pointer to an allocated object in *arg0</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097"> 77</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097">EFT_A1R_NEW</a>, <span class="comment">//as above, into *arg1, etc.</span></div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14"> 78</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14">EFT_A2R_NEW</a>,</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2"> 79</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2">EFT_A4R_NEW</a>,</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be"> 80</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>,</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b"> 81</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b">EFT_STD_RB_TREE_INSERT_AND_REBALANCE</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a31d0b620d3344c68ecfd71c9faf1d598"> 82</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a31d0b620d3344c68ecfd71c9faf1d598">EFT_STD_RB_TREE_INCREMENT</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aed5f4c75cc5016c61f441abf06a2bf21"> 83</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aed5f4c75cc5016c61f441abf06a2bf21">EFT_STD_LIST_HOOK</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae3e90095a170aa15d9b6c305469e32af"> 85</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae3e90095a170aa15d9b6c305469e32af">CPP_EFT_A0R_A1</a>, <span class="comment">//stores arg1 into *arg0</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a7f75d2265448acf50cd59151a1241054"> 86</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a7f75d2265448acf50cd59151a1241054">CPP_EFT_A0R_A1R</a>, <span class="comment">//copies *arg1 into *arg0</span></div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a3eb7d75552ce138f55c840b6635d32ed"> 87</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a3eb7d75552ce138f55c840b6635d32ed">CPP_EFT_A1R</a>, <span class="comment">//load arg1</span></div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9d9ec33eb5ecf285ccf2aa575bcba31a"> 88</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9d9ec33eb5ecf285ccf2aa575bcba31a">EFT_CXA_BEGIN_CATCH</a>, <span class="comment">//__cxa_begin_catch</span></div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6c9b3a6987d311c61156dab96e5ad3b9"> 89</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6c9b3a6987d311c61156dab96e5ad3b9">CPP_EFT_DYNAMIC_CAST</a>, <span class="comment">// dynamic_cast</span></div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9"> 90</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9">EFT_OTHER</a> <span class="comment">//not found in the list</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  };</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">//Each Function name is mapped to its extf_t</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">// (hash_map and map are much slower).</span></div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a21b103f723d914a95fd0eef28551a3ca"> 96</a></span>  llvm::StringMap<extf_t> <a class="code" href="classSVF_1_1ExtAPI.html#a21b103f723d914a95fd0eef28551a3ca">info</a>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">//A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).</span></div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a329882c608e9a6b10a758bcd1ca7a0b5"> 98</a></span>  <a class="code" href="namespaceSVF.html#a8234d4b959abc9123993bcff4eee34c1">Map<const SVFFunction*, bool></a> <a class="code" href="classSVF_1_1ExtAPI.html#a329882c608e9a6b10a758bcd1ca7a0b5">isext_cache</a>;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">init</a>(); <span class="comment">//fill in the map (see ExtAPI.cpp)</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3"> 102</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3">ExtAPI</a>()</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">init</a>();</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  isext_cache.clear();</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// Singleton pattern here to enable instance of SVFIR can only be created once.</span></div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618"> 109</a></span>  <span class="keyword">static</span> <a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a>* <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a86508e03ca1c2e37fc9414cb2335c3ec"> 114</a></span>  <span class="keyword">static</span> <a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a>* <a class="code" href="classSVF_1_1ExtAPI.html#a86508e03ca1c2e37fc9414cb2335c3ec">getExtAPI</a>()</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span> (extAPI == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  extAPI = <span class="keyword">new</span> <a class="code" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3">ExtAPI</a>();</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aa2c730747837106e68a67681455c0657"> 123</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1ExtAPI.html#aa2c730747837106e68a67681455c0657">destory</a>()</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  { </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span> (extAPI != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">delete</span> <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  extAPI = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">//Return the extf_t of (F).</span></div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1"> 133</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(F);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  std::string funName = F-><a class="code" href="classSVF_1_1SVFValue.html#adc15c1f7a77158142156fba7524e89c9">getName</a>().str();</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">if</span>(F-><a class="code" href="classSVF_1_1SVFFunction.html#a7b4c6c7143d012802ea5ee962bec2deb">isIntrinsic</a>())</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  funName = <span class="stringliteral">"llvm."</span> + F-><a class="code" href="classSVF_1_1SVFValue.html#adc15c1f7a77158142156fba7524e89c9">getName</a>().split(<span class="charliteral">'.'</span>).second.split(<span class="charliteral">'.'</span>).first.str();</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  }</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  llvm::StringMap<extf_t>::const_iterator it= info.find(funName);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">if</span>(it == info.end() || !F-><a class="code" href="classSVF_1_1SVFFunction.html#ab672f0255ec8e42d5e414bc8c72b7c76">isDeclaration</a>())</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9">EFT_OTHER</a>;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">return</span> it->second;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="comment">//Does (F) have a static var X (unavailable to us) that its return points to?</span></div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#ae439994d7a92c4cb3bf5c9fa80fa31e8"> 149</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#ae439994d7a92c4cb3bf5c9fa80fa31e8">has_static</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0">EFT_STAT</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">//Assuming hasStatic(F), does (F) have a second static Y where X -> Y?</span></div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aab5731ba773144c7cbb5609e9b807eae"> 155</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#aab5731ba773144c7cbb5609e9b807eae">has_static2</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F) == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="comment">//Does (F) allocate a new object and return it?</span></div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a9ac1ce8f2796d1e70005c6999c9772de"> 160</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a9ac1ce8f2796d1e70005c6999c9772de">is_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="comment">//Does (F) allocate a new object and assign it to one of its arguments?</span></div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#add48f7a9bcb7227727969e944ffe3fc8"> 166</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#add48f7a9bcb7227727969e944ffe3fc8">is_arg_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">return</span> t>=<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a> && t<=<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="comment">//Get the position of argument which holds the new object</span></div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a090df490c65fab16ec9fa5431e13361e"> 172</a></span>  <span class="keywordtype">int</span> <a class="code" href="classSVF_1_1ExtAPI.html#a090df490c65fab16ec9fa5431e13361e">get_alloc_arg_pos</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">switch</span>(t)</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a>:</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097">EFT_A1R_NEW</a>:</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14">EFT_A2R_NEW</a>:</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">return</span> 2;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2">EFT_A4R_NEW</a>:</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> 4;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>:</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordflow">return</span> 11;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"Not an alloc call via argument."</span>);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  }</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">//Does (F) allocate only non-struct objects?</span></div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a235ef40373e36583004eb6d289ce63f9"> 193</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a235ef40373e36583004eb6d289ce63f9">no_struct_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F) == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="comment">//Does (F) not free/release any memory?</span></div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#af09ae44b9311d3dfd9eafd41da8c31be"> 198</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#af09ae44b9311d3dfd9eafd41da8c31be">is_dealloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">return</span> t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">//Does (F) not do anything with the known pointers?</span></div><div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a82439c0d4f80b2d3a4da3a4d090c69dc"> 204</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a82439c0d4f80b2d3a4da3a4d090c69dc">is_noop</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">return</span> t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a> || t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  }</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">//Does (F) reallocate a new object?</span></div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a070e7da81158d8948a4dbc06a0ec3cfe"> 210</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a070e7da81158d8948a4dbc06a0ec3cfe">is_realloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a>;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  }</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">//Should (F) be considered "external" (either not defined in the program</span></div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// or a user-defined version of a known alloc or no-op)?</span></div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#ad1481f542d0a4bf67052ee897b165847"> 217</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#ad1481f542d0a4bf67052ee897b165847">is_ext</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(F);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="comment">//Check the cache first; everything below is slower.</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <a class="code" href="namespaceSVF.html#a8234d4b959abc9123993bcff4eee34c1">Map<const SVFFunction*, bool>::iterator</a> i_iec= isext_cache.find(F);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordflow">if</span>(i_iec != isext_cache.end())</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">return</span> i_iec->second;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordtype">bool</span> res;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">if</span>(F-><a class="code" href="classSVF_1_1SVFFunction.html#ab672f0255ec8e42d5e414bc8c72b7c76">isDeclaration</a>() || F-><a class="code" href="classSVF_1_1SVFFunction.html#a7b4c6c7143d012802ea5ee962bec2deb">isIntrinsic</a>())</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  res= 1;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  res= t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  }</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  isext_cache[F]= res;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> };</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> } <span class="comment">// End namespace SVF</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96">SVF::ExtAPI::EFT_L_A0</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00059">ExtAPI.h:59</a></div></div>
|
|
69
|
+
<a href="ExtAPI_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno"> 1</span> <span class="comment">/* [ExtAPI.h] Info about external llvm::Functions</span></div><div class="line"><a name="l00002"></a><span class="lineno"> 2</span> <span class="comment"> * v. 005, 2008-08-15</span></div><div class="line"><a name="l00003"></a><span class="lineno"> 3</span> <span class="comment"> *------------------------------------------------------------------------------</span></div><div class="line"><a name="l00004"></a><span class="lineno"> 4</span> <span class="comment"> * Copyright 2008 Andrey Petrov</span></div><div class="line"><a name="l00005"></a><span class="lineno"> 5</span> <span class="comment"> * - apetrov87@gmail.com, apetrov@cs.utexas.edu</span></div><div class="line"><a name="l00006"></a><span class="lineno"> 6</span> <span class="comment"> *</span></div><div class="line"><a name="l00007"></a><span class="lineno"> 7</span> <span class="comment"> * Permission is hereby granted, free of charge, to any person</span></div><div class="line"><a name="l00008"></a><span class="lineno"> 8</span> <span class="comment"> * obtaining a copy of this software and associated documentation</span></div><div class="line"><a name="l00009"></a><span class="lineno"> 9</span> <span class="comment"> * files (the "Software"), to deal in the Software without</span></div><div class="line"><a name="l00010"></a><span class="lineno"> 10</span> <span class="comment"> * restriction, including without limitation the rights to use, copy,</span></div><div class="line"><a name="l00011"></a><span class="lineno"> 11</span> <span class="comment"> * modify, merge, publish, distribute, sublicense, and/or sell copies</span></div><div class="line"><a name="l00012"></a><span class="lineno"> 12</span> <span class="comment"> * of the Software, and to permit persons to whom the Software is</span></div><div class="line"><a name="l00013"></a><span class="lineno"> 13</span> <span class="comment"> * furnished to do so, subject to the following conditions:</span></div><div class="line"><a name="l00014"></a><span class="lineno"> 14</span> <span class="comment"> *</span></div><div class="line"><a name="l00015"></a><span class="lineno"> 15</span> <span class="comment"> * The above copyright notice and this permission notice shall be</span></div><div class="line"><a name="l00016"></a><span class="lineno"> 16</span> <span class="comment"> * included in all copies or substantial portions of the Software.</span></div><div class="line"><a name="l00017"></a><span class="lineno"> 17</span> <span class="comment"> *</span></div><div class="line"><a name="l00018"></a><span class="lineno"> 18</span> <span class="comment"> * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,</span></div><div class="line"><a name="l00019"></a><span class="lineno"> 19</span> <span class="comment"> * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF</span></div><div class="line"><a name="l00020"></a><span class="lineno"> 20</span> <span class="comment"> * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND</span></div><div class="line"><a name="l00021"></a><span class="lineno"> 21</span> <span class="comment"> * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT</span></div><div class="line"><a name="l00022"></a><span class="lineno"> 22</span> <span class="comment"> * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,</span></div><div class="line"><a name="l00023"></a><span class="lineno"> 23</span> <span class="comment"> * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,</span></div><div class="line"><a name="l00024"></a><span class="lineno"> 24</span> <span class="comment"> * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER</span></div><div class="line"><a name="l00025"></a><span class="lineno"> 25</span> <span class="comment"> * DEALINGS IN THE SOFTWARE.</span></div><div class="line"><a name="l00026"></a><span class="lineno"> 26</span> <span class="comment"> *------------------------------------------------------------------------------</span></div><div class="line"><a name="l00027"></a><span class="lineno"> 27</span> <span class="comment"> */</span></div><div class="line"><a name="l00028"></a><span class="lineno"> 28</span> </div><div class="line"><a name="l00029"></a><span class="lineno"> 29</span> <span class="comment">/*</span></div><div class="line"><a name="l00030"></a><span class="lineno"> 30</span> <span class="comment"> * Modified by Yulei Sui 2013</span></div><div class="line"><a name="l00031"></a><span class="lineno"> 31</span> <span class="comment">*/</span></div><div class="line"><a name="l00032"></a><span class="lineno"> 32</span> </div><div class="line"><a name="l00033"></a><span class="lineno"> 33</span> <span class="preprocessor">#ifndef __ExtAPI_H</span></div><div class="line"><a name="l00034"></a><span class="lineno"> 34</span> <span class="preprocessor">#define __ExtAPI_H</span></div><div class="line"><a name="l00035"></a><span class="lineno"> 35</span> </div><div class="line"><a name="l00036"></a><span class="lineno"> 36</span> <span class="preprocessor">#include "<a class="code" href="BasicTypes_8h.html">Util/BasicTypes.h</a>"</span></div><div class="line"><a name="l00037"></a><span class="lineno"> 37</span> <span class="preprocessor">#include <map></span></div><div class="line"><a name="l00038"></a><span class="lineno"> 38</span> <span class="preprocessor">#include <set></span></div><div class="line"><a name="l00039"></a><span class="lineno"> 39</span> <span class="preprocessor">#include <string></span></div><div class="line"><a name="l00040"></a><span class="lineno"> 40</span> </div><div class="line"><a name="l00041"></a><span class="lineno"> 41</span> <span class="keyword">namespace </span><a class="code" href="namespaceSVF.html">SVF</a></div><div class="line"><a name="l00042"></a><span class="lineno"> 42</span> {</div><div class="line"><a name="l00043"></a><span class="lineno"> 43</span> </div><div class="line"><a name="l00044"></a><span class="lineno"> 44</span> <span class="comment">//------------------------------------------------------------------------------</span></div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html"> 45</a></span> <span class="keyword">class </span><a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a></div><div class="line"><a name="l00046"></a><span class="lineno"> 46</span> {</div><div class="line"><a name="l00047"></a><span class="lineno"> 47</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00048"></a><span class="lineno"> 48</span>  <span class="comment">//External Function types</span></div><div class="line"><a name="l00049"></a><span class="lineno"> 49</span>  <span class="comment">//Assume a call in the form LHS= F(arg0, arg1, arg2, arg3).</span></div><div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094"> 50</a></span>  <span class="keyword">enum</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a></div><div class="line"><a name="l00051"></a><span class="lineno"> 51</span>  {</div><div class="line"><a name="l00052"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef"> 52</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a>= 0, <span class="comment">//no effect on pointers</span></div><div class="line"><a name="l00053"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4"> 53</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a>, <span class="comment">//returns a ptr to a newly allocated object</span></div><div class="line"><a name="l00054"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c"> 54</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a>, <span class="comment">//like L_A0 if arg0 is a non-null ptr, else ALLOC</span></div><div class="line"><a name="l00055"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73"> 55</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>, <span class="comment">//free memory arg0 and all pointers passing into free function</span></div><div class="line"><a name="l00056"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0"> 56</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>, <span class="comment">//like ALLOC but only allocates non-struct data</span></div><div class="line"><a name="l00057"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0"> 57</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0">EFT_STAT</a>, <span class="comment">//retval points to an unknown static var X</span></div><div class="line"><a name="l00058"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22"> 58</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>, <span class="comment">//ret -> X -> Y (X, Y - external static vars)</span></div><div class="line"><a name="l00059"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96"> 59</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96">EFT_L_A0</a>, <span class="comment">//copies arg0, arg1, or arg2 into LHS</span></div><div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aec63c85b24133af679d60dda42ab44ab"> 60</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aec63c85b24133af679d60dda42ab44ab">EFT_L_A1</a>,</div><div class="line"><a name="l00061"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac078d0307bec384b6df3da561045ff7d"> 61</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac078d0307bec384b6df3da561045ff7d">EFT_L_A2</a>,</div><div class="line"><a name="l00062"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1e119ad93f66dbbf8014917febad843c"> 62</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1e119ad93f66dbbf8014917febad843c">EFT_L_A8</a>,</div><div class="line"><a name="l00063"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aa0cecd43037de38c00ec6017b03bbb3f"> 63</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aa0cecd43037de38c00ec6017b03bbb3f">EFT_L_A0__A0R_A1</a>, <span class="comment">//stores arg1 into *arg0 and returns arg0 (currently only for memset)</span></div><div class="line"><a name="l00064"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a54aa3d7051aab7d65ee1154538bfbb48"> 64</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a54aa3d7051aab7d65ee1154538bfbb48">EFT_L_A0__A0R_A1R</a>, <span class="comment">//copies the data that arg1 points to into the location</span></div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a80ea82d0181911894919c181eb1f4e35"> 65</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a80ea82d0181911894919c181eb1f4e35">EFT_L_A1__FunPtr</a>, <span class="comment">//obtain the address of a symbol based on the arg1 (char*) and parse a function to LHS (e.g., void *dlsym(void *handle, char *funname);)</span></div><div class="line"><a name="l00066"></a><span class="lineno"> 66</span>  <span class="comment">// arg0 points to; note that several fields may be</span></div><div class="line"><a name="l00067"></a><span class="lineno"> 67</span>  <span class="comment">// copied at once if both point to structs.</span></div><div class="line"><a name="l00068"></a><span class="lineno"> 68</span>  <span class="comment">// Returns arg0.</span></div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae7e7e0702f480304f4afefa96f6c5002"> 69</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae7e7e0702f480304f4afefa96f6c5002">EFT_A1R_A0R</a>, <span class="comment">//copies *arg0 into *arg1, with non-ptr return</span></div><div class="line"><a name="l00070"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4ba81144ee1a70785fbf83ca5f0d4573"> 70</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4ba81144ee1a70785fbf83ca5f0d4573">EFT_A3R_A1R_NS</a>, <span class="comment">//copies *arg1 into *arg3 (non-struct copy only)</span></div><div class="line"><a name="l00071"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4c1361546aa103c26b11b0b89dc8d482"> 71</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4c1361546aa103c26b11b0b89dc8d482">EFT_A1R_A0</a>, <span class="comment">//stores arg0 into *arg1</span></div><div class="line"><a name="l00072"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ab8814290c2362cd812a7783802eb209a"> 72</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ab8814290c2362cd812a7783802eb209a">EFT_A2R_A1</a>, <span class="comment">//stores arg1 into *arg2</span></div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d"> 73</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d">EFT_A4R_A1</a>, <span class="comment">//stores arg1 into *arg4</span></div><div class="line"><a name="l00074"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4"> 74</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4">EFT_L_A0__A2R_A0</a>, <span class="comment">//stores arg0 into *arg2 and returns it</span></div><div class="line"><a name="l00075"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aac3eaaf0865895ce144c035e429166be"> 75</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aac3eaaf0865895ce144c035e429166be">EFT_L_A0__A1_A0</a>, <span class="comment">//store arg1 into arg0's base and returns arg0</span></div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899"> 76</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a>, <span class="comment">//stores a pointer to an allocated object in *arg0</span></div><div class="line"><a name="l00077"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097"> 77</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097">EFT_A1R_NEW</a>, <span class="comment">//as above, into *arg1, etc.</span></div><div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14"> 78</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14">EFT_A2R_NEW</a>,</div><div class="line"><a name="l00079"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2"> 79</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2">EFT_A4R_NEW</a>,</div><div class="line"><a name="l00080"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be"> 80</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>,</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b"> 81</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b">EFT_STD_RB_TREE_INSERT_AND_REBALANCE</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a31d0b620d3344c68ecfd71c9faf1d598"> 82</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a31d0b620d3344c68ecfd71c9faf1d598">EFT_STD_RB_TREE_INCREMENT</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00083"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aed5f4c75cc5016c61f441abf06a2bf21"> 83</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094aed5f4c75cc5016c61f441abf06a2bf21">EFT_STD_LIST_HOOK</a>, <span class="comment">// Some complex effects</span></div><div class="line"><a name="l00084"></a><span class="lineno"> 84</span> </div><div class="line"><a name="l00085"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae3e90095a170aa15d9b6c305469e32af"> 85</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae3e90095a170aa15d9b6c305469e32af">CPP_EFT_A0R_A1</a>, <span class="comment">//stores arg1 into *arg0</span></div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a7f75d2265448acf50cd59151a1241054"> 86</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a7f75d2265448acf50cd59151a1241054">CPP_EFT_A0R_A1R</a>, <span class="comment">//copies *arg1 into *arg0</span></div><div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a3eb7d75552ce138f55c840b6635d32ed"> 87</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a3eb7d75552ce138f55c840b6635d32ed">CPP_EFT_A1R</a>, <span class="comment">//load arg1</span></div><div class="line"><a name="l00088"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9d9ec33eb5ecf285ccf2aa575bcba31a"> 88</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9d9ec33eb5ecf285ccf2aa575bcba31a">EFT_CXA_BEGIN_CATCH</a>, <span class="comment">//__cxa_begin_catch</span></div><div class="line"><a name="l00089"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6c9b3a6987d311c61156dab96e5ad3b9"> 89</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6c9b3a6987d311c61156dab96e5ad3b9">CPP_EFT_DYNAMIC_CAST</a>, <span class="comment">// dynamic_cast</span></div><div class="line"><a name="l00090"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9"> 90</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9">EFT_OTHER</a> <span class="comment">//not found in the list</span></div><div class="line"><a name="l00091"></a><span class="lineno"> 91</span>  };</div><div class="line"><a name="l00092"></a><span class="lineno"> 92</span> <span class="keyword">private</span>:</div><div class="line"><a name="l00093"></a><span class="lineno"> 93</span> </div><div class="line"><a name="l00094"></a><span class="lineno"> 94</span>  <span class="comment">//Each Function name is mapped to its extf_t</span></div><div class="line"><a name="l00095"></a><span class="lineno"> 95</span>  <span class="comment">// (hash_map and map are much slower).</span></div><div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a21b103f723d914a95fd0eef28551a3ca"> 96</a></span>  llvm::StringMap<extf_t> <a class="code" href="classSVF_1_1ExtAPI.html#a21b103f723d914a95fd0eef28551a3ca">info</a>;</div><div class="line"><a name="l00097"></a><span class="lineno"> 97</span>  <span class="comment">//A cache of is_ext results for all SVFFunction*'s (hash_map is fastest).</span></div><div class="line"><a name="l00098"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a329882c608e9a6b10a758bcd1ca7a0b5"> 98</a></span>  <a class="code" href="namespaceSVF.html#a8234d4b959abc9123993bcff4eee34c1">Map<const SVFFunction*, bool></a> <a class="code" href="classSVF_1_1ExtAPI.html#a329882c608e9a6b10a758bcd1ca7a0b5">isext_cache</a>;</div><div class="line"><a name="l00099"></a><span class="lineno"> 99</span> </div><div class="line"><a name="l00100"></a><span class="lineno"> 100</span>  <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">init</a>(); <span class="comment">//fill in the map (see ExtAPI.cpp)</span></div><div class="line"><a name="l00101"></a><span class="lineno"> 101</span> </div><div class="line"><a name="l00102"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3"> 102</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3">ExtAPI</a>()</div><div class="line"><a name="l00103"></a><span class="lineno"> 103</span>  {</div><div class="line"><a name="l00104"></a><span class="lineno"> 104</span>  <a class="code" href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">init</a>();</div><div class="line"><a name="l00105"></a><span class="lineno"> 105</span>  isext_cache.clear();</div><div class="line"><a name="l00106"></a><span class="lineno"> 106</span>  }</div><div class="line"><a name="l00107"></a><span class="lineno"> 107</span> </div><div class="line"><a name="l00108"></a><span class="lineno"> 108</span>  <span class="comment">// Singleton pattern here to enable instance of SVFIR can only be created once.</span></div><div class="line"><a name="l00109"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618"> 109</a></span>  <span class="keyword">static</span> <a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a>* <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00110"></a><span class="lineno"> 110</span> </div><div class="line"><a name="l00111"></a><span class="lineno"> 111</span> <span class="keyword">public</span>:</div><div class="line"><a name="l00112"></a><span class="lineno"> 112</span> </div><div class="line"><a name="l00114"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a86508e03ca1c2e37fc9414cb2335c3ec"> 114</a></span>  <span class="keyword">static</span> <a class="code" href="classSVF_1_1ExtAPI.html">ExtAPI</a>* <a class="code" href="classSVF_1_1ExtAPI.html#a86508e03ca1c2e37fc9414cb2335c3ec">getExtAPI</a>()</div><div class="line"><a name="l00115"></a><span class="lineno"> 115</span>  {</div><div class="line"><a name="l00116"></a><span class="lineno"> 116</span>  <span class="keywordflow">if</span> (extAPI == <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00117"></a><span class="lineno"> 117</span>  {</div><div class="line"><a name="l00118"></a><span class="lineno"> 118</span>  extAPI = <span class="keyword">new</span> <a class="code" href="classSVF_1_1ExtAPI.html#af1c46b41e0088411a186228f760a99f3">ExtAPI</a>();</div><div class="line"><a name="l00119"></a><span class="lineno"> 119</span>  }</div><div class="line"><a name="l00120"></a><span class="lineno"> 120</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00121"></a><span class="lineno"> 121</span>  }</div><div class="line"><a name="l00122"></a><span class="lineno"> 122</span> </div><div class="line"><a name="l00123"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aa2c730747837106e68a67681455c0657"> 123</a></span>  <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classSVF_1_1ExtAPI.html#aa2c730747837106e68a67681455c0657">destory</a>()</div><div class="line"><a name="l00124"></a><span class="lineno"> 124</span>  { </div><div class="line"><a name="l00125"></a><span class="lineno"> 125</span>  <span class="keywordflow">if</span> (extAPI != <span class="keyword">nullptr</span>)</div><div class="line"><a name="l00126"></a><span class="lineno"> 126</span>  {</div><div class="line"><a name="l00127"></a><span class="lineno"> 127</span>  <span class="keyword">delete</span> <a class="code" href="classSVF_1_1ExtAPI.html#abe666dfdd9b3dea5ea89a5ed9ca4c618">extAPI</a>;</div><div class="line"><a name="l00128"></a><span class="lineno"> 128</span>  extAPI = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00129"></a><span class="lineno"> 129</span>  }</div><div class="line"><a name="l00130"></a><span class="lineno"> 130</span>  }</div><div class="line"><a name="l00131"></a><span class="lineno"> 131</span> </div><div class="line"><a name="l00132"></a><span class="lineno"> 132</span>  <span class="comment">//Return the extf_t of (F).</span></div><div class="line"><a name="l00133"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1"> 133</a></span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00134"></a><span class="lineno"> 134</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00135"></a><span class="lineno"> 135</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(F);</div><div class="line"><a name="l00136"></a><span class="lineno"> 136</span>  std::string funName = F-><a class="code" href="classSVF_1_1SVFValue.html#adc15c1f7a77158142156fba7524e89c9">getName</a>().str();</div><div class="line"><a name="l00137"></a><span class="lineno"> 137</span>  <span class="keywordflow">if</span>(F-><a class="code" href="classSVF_1_1SVFFunction.html#a7b4c6c7143d012802ea5ee962bec2deb">isIntrinsic</a>())</div><div class="line"><a name="l00138"></a><span class="lineno"> 138</span>  {</div><div class="line"><a name="l00139"></a><span class="lineno"> 139</span>  funName = <span class="stringliteral">"llvm."</span> + F-><a class="code" href="classSVF_1_1SVFValue.html#adc15c1f7a77158142156fba7524e89c9">getName</a>().split(<span class="charliteral">'.'</span>).second.split(<span class="charliteral">'.'</span>).first.str();</div><div class="line"><a name="l00140"></a><span class="lineno"> 140</span>  }</div><div class="line"><a name="l00141"></a><span class="lineno"> 141</span>  llvm::StringMap<extf_t>::const_iterator it= info.find(funName);</div><div class="line"><a name="l00142"></a><span class="lineno"> 142</span>  <span class="keywordflow">if</span>(it == info.end())</div><div class="line"><a name="l00143"></a><span class="lineno"> 143</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac8af5ecc06abccdbcba873e2be3f11f9">EFT_OTHER</a>;</div><div class="line"><a name="l00144"></a><span class="lineno"> 144</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00145"></a><span class="lineno"> 145</span>  <span class="keywordflow">return</span> it->second;</div><div class="line"><a name="l00146"></a><span class="lineno"> 146</span>  }</div><div class="line"><a name="l00147"></a><span class="lineno"> 147</span> </div><div class="line"><a name="l00148"></a><span class="lineno"> 148</span>  <span class="comment">//Does (F) have a static var X (unavailable to us) that its return points to?</span></div><div class="line"><a name="l00149"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#ae439994d7a92c4cb3bf5c9fa80fa31e8"> 149</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#ae439994d7a92c4cb3bf5c9fa80fa31e8">has_static</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00150"></a><span class="lineno"> 150</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00151"></a><span class="lineno"> 151</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00152"></a><span class="lineno"> 152</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a94f514e925fdb422632840ca44343af0">EFT_STAT</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>;</div><div class="line"><a name="l00153"></a><span class="lineno"> 153</span>  }</div><div class="line"><a name="l00154"></a><span class="lineno"> 154</span>  <span class="comment">//Assuming hasStatic(F), does (F) have a second static Y where X -> Y?</span></div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#aab5731ba773144c7cbb5609e9b807eae"> 155</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#aab5731ba773144c7cbb5609e9b807eae">has_static2</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00156"></a><span class="lineno"> 156</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00157"></a><span class="lineno"> 157</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F) == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a515c2184a7461fc1788a514432a7ec22">EFT_STAT2</a>;</div><div class="line"><a name="l00158"></a><span class="lineno"> 158</span>  }</div><div class="line"><a name="l00159"></a><span class="lineno"> 159</span>  <span class="comment">//Does (F) allocate a new object and return it?</span></div><div class="line"><a name="l00160"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a9ac1ce8f2796d1e70005c6999c9772de"> 160</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a9ac1ce8f2796d1e70005c6999c9772de">is_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00161"></a><span class="lineno"> 161</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00162"></a><span class="lineno"> 162</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00163"></a><span class="lineno"> 163</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>;</div><div class="line"><a name="l00164"></a><span class="lineno"> 164</span>  }</div><div class="line"><a name="l00165"></a><span class="lineno"> 165</span>  <span class="comment">//Does (F) allocate a new object and assign it to one of its arguments?</span></div><div class="line"><a name="l00166"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#add48f7a9bcb7227727969e944ffe3fc8"> 166</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#add48f7a9bcb7227727969e944ffe3fc8">is_arg_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00167"></a><span class="lineno"> 167</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00168"></a><span class="lineno"> 168</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00169"></a><span class="lineno"> 169</span>  <span class="keywordflow">return</span> t>=<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a> && t<=<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>;</div><div class="line"><a name="l00170"></a><span class="lineno"> 170</span>  }</div><div class="line"><a name="l00171"></a><span class="lineno"> 171</span>  <span class="comment">//Get the position of argument which holds the new object</span></div><div class="line"><a name="l00172"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a090df490c65fab16ec9fa5431e13361e"> 172</a></span>  <span class="keywordtype">int</span> <a class="code" href="classSVF_1_1ExtAPI.html#a090df490c65fab16ec9fa5431e13361e">get_alloc_arg_pos</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00173"></a><span class="lineno"> 173</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00174"></a><span class="lineno"> 174</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00175"></a><span class="lineno"> 175</span>  <span class="keywordflow">switch</span>(t)</div><div class="line"><a name="l00176"></a><span class="lineno"> 176</span>  {</div><div class="line"><a name="l00177"></a><span class="lineno"> 177</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a035cf8a39c192608ec0e91d48e479899">EFT_A0R_NEW</a>:</div><div class="line"><a name="l00178"></a><span class="lineno"> 178</span>  <span class="keywordflow">return</span> 0;</div><div class="line"><a name="l00179"></a><span class="lineno"> 179</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a4353ad2b443e7f7ce2151869eed9c097">EFT_A1R_NEW</a>:</div><div class="line"><a name="l00180"></a><span class="lineno"> 180</span>  <span class="keywordflow">return</span> 1;</div><div class="line"><a name="l00181"></a><span class="lineno"> 181</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a27b8dfa0742daa17c3e1a520d03dbd14">EFT_A2R_NEW</a>:</div><div class="line"><a name="l00182"></a><span class="lineno"> 182</span>  <span class="keywordflow">return</span> 2;</div><div class="line"><a name="l00183"></a><span class="lineno"> 183</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afe69efc20e29f95e0e333d1a462576a2">EFT_A4R_NEW</a>:</div><div class="line"><a name="l00184"></a><span class="lineno"> 184</span>  <span class="keywordflow">return</span> 4;</div><div class="line"><a name="l00185"></a><span class="lineno"> 185</span>  <span class="keywordflow">case</span> <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8b59b6966952577361826d09b95b76be">EFT_A11R_NEW</a>:</div><div class="line"><a name="l00186"></a><span class="lineno"> 186</span>  <span class="keywordflow">return</span> 11;</div><div class="line"><a name="l00187"></a><span class="lineno"> 187</span>  <span class="keywordflow">default</span>:</div><div class="line"><a name="l00188"></a><span class="lineno"> 188</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(<span class="keyword">false</span> && <span class="stringliteral">"Not an alloc call via argument."</span>);</div><div class="line"><a name="l00189"></a><span class="lineno"> 189</span>  <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00190"></a><span class="lineno"> 190</span>  }</div><div class="line"><a name="l00191"></a><span class="lineno"> 191</span>  }</div><div class="line"><a name="l00192"></a><span class="lineno"> 192</span>  <span class="comment">//Does (F) allocate only non-struct objects?</span></div><div class="line"><a name="l00193"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a235ef40373e36583004eb6d289ce63f9"> 193</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a235ef40373e36583004eb6d289ce63f9">no_struct_alloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00194"></a><span class="lineno"> 194</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00195"></a><span class="lineno"> 195</span>  <span class="keywordflow">return</span> <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F) == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a>;</div><div class="line"><a name="l00196"></a><span class="lineno"> 196</span>  }</div><div class="line"><a name="l00197"></a><span class="lineno"> 197</span>  <span class="comment">//Does (F) not free/release any memory?</span></div><div class="line"><a name="l00198"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#af09ae44b9311d3dfd9eafd41da8c31be"> 198</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#af09ae44b9311d3dfd9eafd41da8c31be">is_dealloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00199"></a><span class="lineno"> 199</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00200"></a><span class="lineno"> 200</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00201"></a><span class="lineno"> 201</span>  <span class="keywordflow">return</span> t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00202"></a><span class="lineno"> 202</span>  }</div><div class="line"><a name="l00203"></a><span class="lineno"> 203</span>  <span class="comment">//Does (F) not do anything with the known pointers?</span></div><div class="line"><a name="l00204"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a82439c0d4f80b2d3a4da3a4d090c69dc"> 204</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a82439c0d4f80b2d3a4da3a4d090c69dc">is_noop</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00205"></a><span class="lineno"> 205</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00206"></a><span class="lineno"> 206</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00207"></a><span class="lineno"> 207</span>  <span class="keywordflow">return</span> t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a> || t == <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00208"></a><span class="lineno"> 208</span>  }</div><div class="line"><a name="l00209"></a><span class="lineno"> 209</span>  <span class="comment">//Does (F) reallocate a new object?</span></div><div class="line"><a name="l00210"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#a070e7da81158d8948a4dbc06a0ec3cfe"> 210</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#a070e7da81158d8948a4dbc06a0ec3cfe">is_realloc</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)<span class="keyword"> const</span></div><div class="line"><a name="l00211"></a><span class="lineno"> 211</span> <span class="keyword"> </span>{</div><div class="line"><a name="l00212"></a><span class="lineno"> 212</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00213"></a><span class="lineno"> 213</span>  <span class="keywordflow">return</span> t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a>;</div><div class="line"><a name="l00214"></a><span class="lineno"> 214</span>  }</div><div class="line"><a name="l00215"></a><span class="lineno"> 215</span>  <span class="comment">//Should (F) be considered "external" (either not defined in the program</span></div><div class="line"><a name="l00216"></a><span class="lineno"> 216</span>  <span class="comment">// or a user-defined version of a known alloc or no-op)?</span></div><div class="line"><a name="l00217"></a><span class="lineno"><a class="line" href="classSVF_1_1ExtAPI.html#ad1481f542d0a4bf67052ee897b165847"> 217</a></span>  <span class="keywordtype">bool</span> <a class="code" href="classSVF_1_1ExtAPI.html#ad1481f542d0a4bf67052ee897b165847">is_ext</a>(<span class="keyword">const</span> <a class="code" href="classSVF_1_1SVFFunction.html">SVFFunction</a>* F)</div><div class="line"><a name="l00218"></a><span class="lineno"> 218</span>  {</div><div class="line"><a name="l00219"></a><span class="lineno"> 219</span>  <a class="code" href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a>(F);</div><div class="line"><a name="l00220"></a><span class="lineno"> 220</span>  <span class="comment">//Check the cache first; everything below is slower.</span></div><div class="line"><a name="l00221"></a><span class="lineno"> 221</span>  <a class="code" href="namespaceSVF.html#a8234d4b959abc9123993bcff4eee34c1">Map<const SVFFunction*, bool>::iterator</a> i_iec= isext_cache.find(F);</div><div class="line"><a name="l00222"></a><span class="lineno"> 222</span>  <span class="keywordflow">if</span>(i_iec != isext_cache.end())</div><div class="line"><a name="l00223"></a><span class="lineno"> 223</span>  <span class="keywordflow">return</span> i_iec->second;</div><div class="line"><a name="l00224"></a><span class="lineno"> 224</span> </div><div class="line"><a name="l00225"></a><span class="lineno"> 225</span>  <span class="keywordtype">bool</span> res;</div><div class="line"><a name="l00226"></a><span class="lineno"> 226</span>  <span class="keywordflow">if</span>(F-><a class="code" href="classSVF_1_1SVFFunction.html#ab672f0255ec8e42d5e414bc8c72b7c76">isDeclaration</a>() || F-><a class="code" href="classSVF_1_1SVFFunction.html#a7b4c6c7143d012802ea5ee962bec2deb">isIntrinsic</a>())</div><div class="line"><a name="l00227"></a><span class="lineno"> 227</span>  {</div><div class="line"><a name="l00228"></a><span class="lineno"> 228</span>  res= 1;</div><div class="line"><a name="l00229"></a><span class="lineno"> 229</span>  }</div><div class="line"><a name="l00230"></a><span class="lineno"> 230</span>  <span class="keywordflow">else</span></div><div class="line"><a name="l00231"></a><span class="lineno"> 231</span>  {</div><div class="line"><a name="l00232"></a><span class="lineno"> 232</span>  <a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094">extf_t</a> t= <a class="code" href="classSVF_1_1ExtAPI.html#a90b433cf855adcf34c6ef7f7e5be62b1">get_type</a>(F);</div><div class="line"><a name="l00233"></a><span class="lineno"> 233</span>  res= t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac57ade96d1d18b9f2d4d36bc6928c5c4">EFT_ALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">EFT_REALLOC</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a8782293305260b1500a09b473439d3b0">EFT_NOSTRUCT_ALLOC</a></div><div class="line"><a name="l00234"></a><span class="lineno"> 234</span>  || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a87c4ba17ac3567a0673d6516995e06ef">EFT_NOOP</a> || t==<a class="code" href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">EFT_FREE</a>;</div><div class="line"><a name="l00235"></a><span class="lineno"> 235</span>  }</div><div class="line"><a name="l00236"></a><span class="lineno"> 236</span>  isext_cache[F]= res;</div><div class="line"><a name="l00237"></a><span class="lineno"> 237</span>  <span class="keywordflow">return</span> res;</div><div class="line"><a name="l00238"></a><span class="lineno"> 238</span>  }</div><div class="line"><a name="l00239"></a><span class="lineno"> 239</span> };</div><div class="line"><a name="l00240"></a><span class="lineno"> 240</span> </div><div class="line"><a name="l00241"></a><span class="lineno"> 241</span> } <span class="comment">// End namespace SVF</span></div><div class="line"><a name="l00242"></a><span class="lineno"> 242</span> </div><div class="line"><a name="l00243"></a><span class="lineno"> 243</span> <span class="preprocessor">#endif</span></div><div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a6363df51947cab85ec4ae04b4e056f96">SVF::ExtAPI::EFT_L_A0</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00059">ExtAPI.h:59</a></div></div>
|
|
70
70
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094afedd2f66497ed9404b8b3cb1d16a3f0b">SVF::ExtAPI::EFT_STD_RB_TREE_INSERT_AND_REBALANCE</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00081">ExtAPI.h:81</a></div></div>
|
|
71
71
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aa2c730747837106e68a67681455c0657"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aa2c730747837106e68a67681455c0657">SVF::ExtAPI::destory</a></div><div class="ttdeci">static void destory()</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00123">ExtAPI.h:123</a></div></div>
|
|
72
72
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ac631e9cc3bb430a9c12d0c004d2ca97d">SVF::ExtAPI::EFT_A4R_A1</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00073">ExtAPI.h:73</a></div></div>
|
|
@@ -101,7 +101,7 @@ $(function() {
|
|
|
101
101
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_a9ac1ce8f2796d1e70005c6999c9772de"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#a9ac1ce8f2796d1e70005c6999c9772de">SVF::ExtAPI::is_alloc</a></div><div class="ttdeci">bool is_alloc(const SVFFunction *F) const</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00160">ExtAPI.h:160</a></div></div>
|
|
102
102
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_ae439994d7a92c4cb3bf5c9fa80fa31e8"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#ae439994d7a92c4cb3bf5c9fa80fa31e8">SVF::ExtAPI::has_static</a></div><div class="ttdeci">bool has_static(const SVFFunction *F) const</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00149">ExtAPI.h:149</a></div></div>
|
|
103
103
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a1f23e7b8cdd103943f515e807bf36b1c">SVF::ExtAPI::EFT_REALLOC</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00054">ExtAPI.h:54</a></div></div>
|
|
104
|
-
<div class="ttc" id="classSVF_1_1ExtAPI_html_ac8af2b917fcc71c0a1a66b8cb0cc55ba"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">SVF::ExtAPI::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8cpp_source.html#
|
|
104
|
+
<div class="ttc" id="classSVF_1_1ExtAPI_html_ac8af2b917fcc71c0a1a66b8cb0cc55ba"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#ac8af2b917fcc71c0a1a66b8cb0cc55ba">SVF::ExtAPI::init</a></div><div class="ttdeci">void init()</div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8cpp_source.html#l00848">ExtAPI.cpp:848</a></div></div>
|
|
105
105
|
<div class="ttc" id="BasicTypes_8h_html"><div class="ttname"><a href="BasicTypes_8h.html">BasicTypes.h</a></div></div>
|
|
106
106
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094a9b98279d1926e4ebfb237a43536c7b73">SVF::ExtAPI::EFT_FREE</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00055">ExtAPI.h:55</a></div></div>
|
|
107
107
|
<div class="ttc" id="classSVF_1_1ExtAPI_html_aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4"><div class="ttname"><a href="classSVF_1_1ExtAPI.html#aaf94c82d98f8ed1514ee49c9881a4094ae8423cc29f4de0225e30de6982e6a3a4">SVF::ExtAPI::EFT_L_A0__A2R_A0</a></div><div class="ttdef"><b>Definition:</b> <a href="ExtAPI_8h_source.html#l00074">ExtAPI.h:74</a></div></div>
|
|
@@ -77,7 +77,7 @@ $(function() {
|
|
|
77
77
|
<div class="ttc" id="util_8h_html_a07d17d6d5d1074c0969bc5d3c3d1d84a"><div class="ttname"><a href="util_8h.html#a07d17d6d5d1074c0969bc5d3c3d1d84a">assert</a></div><div class="ttdeci">#define assert(ex)</div><div class="ttdef"><b>Definition:</b> <a href="util_8h_source.html#l00141">util.h:141</a></div></div>
|
|
78
78
|
<div class="ttc" id="classSVF_1_1GepStmt_html"><div class="ttname"><a href="classSVF_1_1GepStmt.html">SVF::GepStmt</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00409">SVFStatements.h:409</a></div></div>
|
|
79
79
|
<div class="ttc" id="classSVF_1_1GenericEdge_html_ae6792506a0150a9400d635eceab7f9e7"><div class="ttname"><a href="classSVF_1_1GenericEdge.html#ae6792506a0150a9400d635eceab7f9e7">SVF::GenericEdge::getSrcID</a></div><div class="ttdeci">NodeID getSrcID() const</div><div class="ttdoc">get methods of the components </div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00073">GenericGraph.h:73</a></div></div>
|
|
80
|
-
<div class="ttc" id="classSVF_1_1CallCFGEdge_html"><div class="ttname"><a href="classSVF_1_1CallCFGEdge.html">SVF::CallCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#
|
|
80
|
+
<div class="ttc" id="classSVF_1_1CallCFGEdge_html"><div class="ttname"><a href="classSVF_1_1CallCFGEdge.html">SVF::CallCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00165">ICFGEdge.h:165</a></div></div>
|
|
81
81
|
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div></div>
|
|
82
82
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a28c0ede7e4765d2a686fc8ae0f5641a4"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a28c0ede7e4765d2a686fc8ae0f5641a4">SVF::SVFUtil::getSourceLoc</a></div><div class="ttdeci">std::string getSourceLoc(const Value *val)</div><div class="ttdoc">Return source code including line number and file name from debug information. </div><div class="ttdef"><b>Definition:</b> <a href="SVFUtil_8cpp_source.html#l00269">SVFUtil.cpp:269</a></div></div>
|
|
83
83
|
<div class="ttc" id="classSVF_1_1GenericNode_html_a391e996d695b114530120723da1d003e"><div class="ttname"><a href="classSVF_1_1GenericNode.html#a391e996d695b114530120723da1d003e">SVF::GenericNode::getNodeKind</a></div><div class="ttdeci">GNodeK getNodeKind() const</div><div class="ttdoc">Get node kind. </div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00171">GenericGraph.h:171</a></div></div>
|
|
@@ -103,7 +103,7 @@ $(function() {
|
|
|
103
103
|
<div class="ttc" id="classSVF_1_1GenericNode_html_a19a3366fd8a58290d0c740c46c3dcb3d"><div class="ttname"><a href="classSVF_1_1GenericNode.html#a19a3366fd8a58290d0c740c46c3dcb3d">SVF::GenericNode::OutEdgeEnd</a></div><div class="ttdeci">iterator OutEdgeEnd()</div><div class="ttdef"><b>Definition:</b> <a href="GenericGraph_8h_source.html#l00206">GenericGraph.h:206</a></div></div>
|
|
104
104
|
<div class="ttc" id="classSVF_1_1IntraICFGNode_html"><div class="ttname"><a href="classSVF_1_1IntraICFGNode.html">SVF::IntraICFGNode</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGNode_8h_source.html#l00175">ICFGNode.h:175</a></div></div>
|
|
105
105
|
<div class="ttc" id="namespaceSVF_html_a90b263fd2f541eca78135078114cabda"><div class="ttname"><a href="namespaceSVF.html#a90b263fd2f541eca78135078114cabda">SVF::Value</a></div><div class="ttdeci">llvm::Value Value</div><div class="ttdef"><b>Definition:</b> <a href="BasicTypes_8h_source.html#l00078">BasicTypes.h:78</a></div></div>
|
|
106
|
-
<div class="ttc" id="classSVF_1_1RetCFGEdge_html"><div class="ttname"><a href="classSVF_1_1RetCFGEdge.html">SVF::RetCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#
|
|
106
|
+
<div class="ttc" id="classSVF_1_1RetCFGEdge_html"><div class="ttname"><a href="classSVF_1_1RetCFGEdge.html">SVF::RetCFGEdge</a></div><div class="ttdef"><b>Definition:</b> <a href="ICFGEdge_8h_source.html#l00202">ICFGEdge.h:202</a></div></div>
|
|
107
107
|
<div class="ttc" id="namespaceSVF_1_1SVFUtil_html_a22ef185e767ff76c098e75126c885400"><div class="ttname"><a href="namespaceSVF_1_1SVFUtil.html#a22ef185e767ff76c098e75126c885400">SVF::SVFUtil::isExtCall</a></div><div class="ttdeci">bool isExtCall(const SVFFunction *fun)</div><div class="ttdef"><b>Definition:</b> <a href="LLVMUtil_8h_source.html#l00063">LLVMUtil.h:63</a></div></div>
|
|
108
108
|
<div class="ttc" id="classSVF_1_1SVFStmt_html"><div class="ttname"><a href="classSVF_1_1SVFStmt.html">SVF::SVFStmt</a></div><div class="ttdef"><b>Definition:</b> <a href="SVFStatements_8h_source.html#l00047">SVFStatements.h:47</a></div></div>
|
|
109
109
|
</div><!-- fragment --></div><!-- contents -->
|