Files
revng-revng/lib/RestructureCFGPass/ExprNode.cpp
T
2020-11-12 18:00:45 +01:00

25 lines
522 B
C++

//
// Copyright rev.ng Srls. See LICENSE.md for details.
//
#include "revng/Support/Debug.h"
#include "revng-c/RestructureCFGPass/ExprNode.h"
void ExprNode::deleteExprNode(ExprNode *E) {
switch (E->getKind()) {
case NodeKind::NK_Atomic:
delete static_cast<AtomicNode *>(E);
break;
case NodeKind::NK_Not:
delete static_cast<NotNode *>(E);
break;
case NodeKind::NK_And:
delete static_cast<AndNode *>(E);
break;
case NodeKind::NK_Or:
delete static_cast<OrNode *>(E);
break;
}
}