Files
revng-revng/lib/RestructureCFGPass/ExprNode.cpp
T
2020-11-06 15:07:45 +01:00

27 lines
554 B
C++

//
// Copyright (c) rev.ng Srls 2017-2020.
//
// revng includes
#include <revng/Support/Debug.h>
// Local libraries includes
#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;
}
}