chromium/third_party/angle/src/compiler/translator/tree_ops/PruneEmptyCases.cpp

//
// Copyright 2018 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// PruneEmptyCases.cpp: The PruneEmptyCases function prunes cases that are followed by nothing from
// the AST.

#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)
{}

// Return true if all statements in "statements" consist only of empty blocks and no-op statements.
// Returns true also if there are no statements.
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)
{}

}  // namespace

bool PruneEmptyCases(TCompiler *compiler, TIntermBlock *root)
{}

}  // namespace sh