mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-27 13:30:05 +00:00
Don't delete values that may still be referenced!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4940 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ade0de9123
commit
cdbfa422cd
@ -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)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user