Create constant expression casts instead of constant instructions if possible
[oota-llvm.git] / lib / CodeGen / MachineCodeForInstruction.cpp
index f3080628ee83906141ea961c99d381510e35e2fa..7b2fb75c653bba751619f5ff51fa7ae682a5812e 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "llvm/CodeGen/MachineCodeForInstruction.h"
 #include "llvm/CodeGen/MachineInstr.h"
+#include "llvm/CodeGen/MachineInstrAnnot.h"
 #include "llvm/CodeGen/InstrSelection.h"
 
 AnnotationID MCFI_AID(
@@ -55,4 +56,8 @@ MachineCodeForInstruction::~MachineCodeForInstruction()
   // Free the MachineInstr objects allocated, if any.
   for (unsigned i=0, N = size(); i < N; i++)
     delete (*this)[i];
+
+  // Free the CallArgsDescriptor if it exists.
+  if (callArgsDesc)
+    delete callArgsDesc;
 }