Don't delete values that may still be referenced!
authorChris Lattner <sabre@nondot.org>
Fri, 6 Dec 2002 04:02:48 +0000 (04:02 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 6 Dec 2002 04:02:48 +0000 (04:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4940 91177308-0d34-0410-b5e6-96231b3b80d8

support/tools/TableGen/Record.cpp
utils/TableGen/Record.cpp

index d48d987a85a5ccf65e79eda45b027c011f6cacc8..b33e5e774b7e9a113d85c07b0aa89446b3d73536 100644 (file)
@@ -19,7 +19,6 @@ Init *BitRecTy::convertValue(BitsInit *BI) {
 Init *BitRecTy::convertValue(IntInit *II) {
   int Val = II->getValue();
   if (Val != 0 && Val != 1) return 0;  // Only accept 0 or 1 for a bit!
-  delete II;
   
   return new BitInit(Val != 0); 
 }
@@ -50,7 +49,6 @@ Init *BitsRecTy::convertValue(BitInit *UI) {
 //
 Init *BitsRecTy::convertValue(IntInit *II) {
   int Value = II->getValue();
-  delete II;
 
   BitsInit *Ret = new BitsInit(Size);
   for (unsigned i = 0; i != Size; ++i)
index d48d987a85a5ccf65e79eda45b027c011f6cacc8..b33e5e774b7e9a113d85c07b0aa89446b3d73536 100644 (file)
@@ -19,7 +19,6 @@ Init *BitRecTy::convertValue(BitsInit *BI) {
 Init *BitRecTy::convertValue(IntInit *II) {
   int Val = II->getValue();
   if (Val != 0 && Val != 1) return 0;  // Only accept 0 or 1 for a bit!
-  delete II;
   
   return new BitInit(Val != 0); 
 }
@@ -50,7 +49,6 @@ Init *BitsRecTy::convertValue(BitInit *UI) {
 //
 Init *BitsRecTy::convertValue(IntInit *II) {
   int Value = II->getValue();
-  delete II;
 
   BitsInit *Ret = new BitsInit(Size);
   for (unsigned i = 0; i != Size; ++i)