Fix a big problem in the recent dtor refactoring work, now it passes 2007-11-19-InlineAsm.ll

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44755 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2007-12-10 01:48:29 +00:00
parent ed455c8fa2
commit 429c8221cc

View File

@ -137,41 +137,7 @@ Value::~Value()
if (BinaryOperator *BO = dyn_cast<BinaryOperator>(this)) if (BinaryOperator *BO = dyn_cast<BinaryOperator>(this))
BinaryOperator::destroyThis(BO); BinaryOperator::destroyThis(BO);
else if (CallInst *CI = dyn_cast<CallInst>(this)) else if (CallInst *CI = dyn_cast<CallInst>(this))
{ CallInst::destroyThis(CI);
if(IntrinsicInst* II = dyn_cast<IntrinsicInst>(this))
{
if(DbgInfoIntrinsic* DII = dyn_cast<DbgInfoIntrinsic>(this))
{
if(DbgDeclareInst* DDI = dyn_cast<DbgDeclareInst>(this))
DbgDeclareInst::destroyThis(DDI);
else if(DbgFuncStartInst* DFSI = dyn_cast<DbgFuncStartInst>(this))
DbgFuncStartInst::destroyThis(DFSI);
else if(DbgRegionEndInst* DREI = dyn_cast<DbgRegionEndInst>(this))
DbgRegionEndInst::destroyThis(DREI);
else if(DbgRegionStartInst* DRSI = dyn_cast<DbgRegionStartInst>(this))
DbgRegionStartInst::destroyThis(DRSI);
else if(DbgStopPointInst* DSPI = dyn_cast<DbgStopPointInst>(this))
DbgStopPointInst::destroyThis(DSPI);
else
assert(0 && "Unknown DbgInfo-inherited class in ~Value.");
}
else if(MemIntrinsic* MI = dyn_cast<MemIntrinsic>(this))
{
if(MemCpyInst* MCI = dyn_cast<MemCpyInst>(this))
MemCpyInst::destroyThis(MCI);
else if(MemMoveInst* MMI = dyn_cast<MemMoveInst>(this))
MemMoveInst::destroyThis(MMI);
else if(MemSetInst* MSI = dyn_cast<MemSetInst>(this))
MemSetInst::destroyThis(MSI);
else
assert(0 && "Unknown MemIntrinsic-inherited class in ~Value.");
}
else
assert(0 && "Unknown IntrinsicInst-inherited class in ~Value.");
}
else
assert(0 && "Unknown CallInst-inherited class in ~Value.");
}
else if (CmpInst *CI = dyn_cast<CmpInst>(this)) else if (CmpInst *CI = dyn_cast<CmpInst>(this))
{ {
if (FCmpInst *FCI = dyn_cast<FCmpInst>(this)) if (FCmpInst *FCI = dyn_cast<FCmpInst>(this))
@ -222,32 +188,30 @@ Value::~Value()
MallocInst::destroyThis(MI); MallocInst::destroyThis(MI);
else else
assert(0 && "Unknown AllocationInst-inherited class in ~Value."); assert(0 && "Unknown AllocationInst-inherited class in ~Value.");
} } else if(CastInst* CI = dyn_cast<CastInst>(this)) {
else if(CastInst* CI = dyn_cast<CastInst>(this)) if(BitCastInst* BCI = dyn_cast<BitCastInst>(CI))
{
if(BitCastInst* BCI = dyn_cast<BitCastInst>(this))
BitCastInst::destroyThis(BCI); BitCastInst::destroyThis(BCI);
else if(FPExtInst* FPEI = dyn_cast<FPExtInst>(this)) else if(FPExtInst* FPEI = dyn_cast<FPExtInst>(CI))
FPExtInst::destroyThis(FPEI); FPExtInst::destroyThis(FPEI);
else if(FPToSIInst* FPSII = dyn_cast<FPToSIInst>(this)) else if(FPToSIInst* FPSII = dyn_cast<FPToSIInst>(CI))
FPToSIInst::destroyThis(FPSII); FPToSIInst::destroyThis(FPSII);
else if(FPToUIInst* FPUII = dyn_cast<FPToUIInst>(this)) else if(FPToUIInst* FPUII = dyn_cast<FPToUIInst>(CI))
FPToUIInst::destroyThis(FPUII); FPToUIInst::destroyThis(FPUII);
else if(FPTruncInst* FPTI = dyn_cast<FPTruncInst>(this)) else if(FPTruncInst* FPTI = dyn_cast<FPTruncInst>(CI))
FPTruncInst::destroyThis(FPTI); FPTruncInst::destroyThis(FPTI);
else if(IntToPtrInst* I2PI = dyn_cast<IntToPtrInst>(this)) else if(IntToPtrInst* I2PI = dyn_cast<IntToPtrInst>(CI))
IntToPtrInst::destroyThis(I2PI); IntToPtrInst::destroyThis(I2PI);
else if(PtrToIntInst* P2II = dyn_cast<PtrToIntInst>(this)) else if(PtrToIntInst* P2II = dyn_cast<PtrToIntInst>(CI))
PtrToIntInst::destroyThis(P2II); PtrToIntInst::destroyThis(P2II);
else if(SExtInst* SEI = dyn_cast<SExtInst>(this)) else if(SExtInst* SEI = dyn_cast<SExtInst>(CI))
SExtInst::destroyThis(SEI); SExtInst::destroyThis(SEI);
else if(SIToFPInst* SIFPI = dyn_cast<SIToFPInst>(this)) else if(SIToFPInst* SIFPI = dyn_cast<SIToFPInst>(CI))
SIToFPInst::destroyThis(SIFPI); SIToFPInst::destroyThis(SIFPI);
else if(TruncInst* TI = dyn_cast<TruncInst>(this)) else if(TruncInst* TI = dyn_cast<TruncInst>(CI))
TruncInst::destroyThis(TI); TruncInst::destroyThis(TI);
else if(UIToFPInst* UIFPI = dyn_cast<UIToFPInst>(this)) else if(UIToFPInst* UIFPI = dyn_cast<UIToFPInst>(CI))
UIToFPInst::destroyThis(UIFPI); UIToFPInst::destroyThis(UIFPI);
else if(ZExtInst* ZEI = dyn_cast<ZExtInst>(this)) else if(ZExtInst* ZEI = dyn_cast<ZExtInst>(CI))
ZExtInst::destroyThis(ZEI); ZExtInst::destroyThis(ZEI);
else else
assert(0 && "Unknown CastInst-inherited class in ~Value."); assert(0 && "Unknown CastInst-inherited class in ~Value.");