Skip to content
  • Mark Seaborn's avatar
    Fix inlining to not produce duplicate landingpad clauses · ef3dbb93
    Mark Seaborn authored
    Before this change, inlining one "invoke" into an outer "invoke" call
    site can lead to the outer landingpad's catch/filter clauses being
    copied multiple times into the resulting landingpad.  This happens:
    
     * when the inlined function contains multiple "resume" instructions,
       because forwardResume() copies the clauses but is called multiple
       times;
    
     * when the inlined function contains a "resume" and a "call", because
       HandleCallsInBlockInlinedThroughInvoke() copies the clauses but is
       redundant with forwardResume().
    
    Fix this by deduplicating the code.
    
    This problem doesn't lead to any incorrect execution; it's only
    untidy.
    
    This change will make fixing PR17872 a little easier.
    
    llvm-svn: 196710
    ef3dbb93
Loading