[vmkit-commits] [vmkit] r96258 - /vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp

Nicolas Geoffray nicolas.geoffray at lip6.fr
Mon Feb 15 12:16:54 PST 2010


Author: geoffray
Date: Mon Feb 15 14:16:53 2010
New Revision: 96258

URL: http://llvm.org/viewvc/llvm-project?rev=96258&view=rev
Log:
Fix memory errors revealed by valgrind.


Modified:
    vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp

Modified: vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp
URL: http://llvm.org/viewvc/llvm-project/vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp?rev=96258&r1=96257&r2=96258&view=diff

==============================================================================
--- vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp (original)
+++ vmkit/trunk/lib/J3/Compiler/LowerConstantCalls.cpp Mon Feb 15 14:16:53 2010
@@ -184,8 +184,7 @@
             if (StoreInst* SI = dyn_cast<StoreInst>(Temp)) {
               if (dyn_cast<Instruction>(II) == SI) ++II;
               SI->eraseFromParent();
-            }
-            if (BitCastInst* BI = dyn_cast<BitCastInst>(Temp)) {
+            } else if (BitCastInst* BI = dyn_cast<BitCastInst>(Temp)) {
               CallSite Call = CallSite::get(*(BI->use_begin()));
               Instruction* CI = Call.getInstruction();
               if (dyn_cast<Instruction>(II) == CI) ++II;
@@ -196,6 +195,7 @@
           }
           AI->eraseFromParent();
         }
+        continue;
       }
 
       CallSite Call = CallSite::get(I);





More information about the vmkit-commits mailing list