Skip to content
  • Chris Lattner's avatar
    Fix PR4834, a tricky case where the inliner would resolve an · 081375bb
    Chris Lattner authored
    indirect function pointer, inline it, then go to delete the body.
    The problem is that the callgraph had other references to the function,
    though the inliner had no way to know it, so we got a dangling pointer
    and an invalid iterator out of the deal.
    
    The fix to this is pretty simple: stop the inliner from deleting the
    function by knowing that there are references to it.  Do this by making
    CallGraphNodes contain a refcount.  This requires moving deletion of 
    available_externally functions to the module-level cleanup sweep where
    it belongs.
    
    llvm-svn: 80533
    081375bb
Loading