[llvm-commits] [llvm] r138406 - /llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp

Bill Wendling isanbard at gmail.com
Tue Aug 23 15:55:03 PDT 2011


Author: void
Date: Tue Aug 23 17:55:03 2011
New Revision: 138406

URL: http://llvm.org/viewvc/llvm-project?rev=138406&view=rev
Log:
Don't replace *all* uses with the new stuff.

This is not necessarily the first or dominating use of the EH values. The IR
breaks if it's not. So replace the specific value in the instruction with the
new value.

Modified:
    llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp

Modified: llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp?rev=138406&r1=138405&r2=138406&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/SjLjEHPrepare.cpp Tue Aug 23 17:55:03 2011
@@ -347,7 +347,7 @@
       continue;
     }
 
-    Inst->replaceAllUsesWith(CreateLandingPadLoad(F, ExnAddr, SelAddr, I));
+    I->replaceUsesOfWith(Inst, CreateLandingPadLoad(F, ExnAddr, SelAddr, I));
   }
 }
 





More information about the llvm-commits mailing list