#include "compiler/translator/tree_ops/PruneEmptyCases.h"
#include "compiler/translator/Symbol.h"
#include "compiler/translator/tree_util/IntermTraverse.h"
namespace sh
{
namespace
{
bool AreEmptyBlocks(const TIntermSequence *statements);
bool IsEmptyBlock(TIntermNode *node)
{ … }
bool AreEmptyBlocks(const TIntermSequence *statements)
{ … }
class PruneEmptyCasesTraverser : private TIntermTraverser
{ … };
bool PruneEmptyCasesTraverser::apply(TCompiler *compiler, TIntermBlock *root)
{ … }
PruneEmptyCasesTraverser::PruneEmptyCasesTraverser() : … { … }
bool PruneEmptyCasesTraverser::visitSwitch(Visit visit, TIntermSwitch *node)
{ … }
}
bool PruneEmptyCases(TCompiler *compiler, TIntermBlock *root)
{ … }
}