#ifndef SOURCE_OPT_BASIC_BLOCK_H_
#define SOURCE_OPT_BASIC_BLOCK_H_
#include <functional>
#include <iterator>
#include <memory>
#include <ostream>
#include <string>
#include <utility>
#include <vector>
#include "source/opt/instruction.h"
#include "source/opt/instruction_list.h"
#include "source/opt/iterator.h"
namespace spvtools {
namespace opt {
class Function;
class IRContext;
class BasicBlock { … };
std::ostream& operator<<(std::ostream& str, const BasicBlock& block);
inline BasicBlock::BasicBlock(std::unique_ptr<Instruction> label)
: … { … }
inline void BasicBlock::AddInstruction(std::unique_ptr<Instruction> i) { … }
inline void BasicBlock::AddInstructions(BasicBlock* bp) { … }
inline bool BasicBlock::WhileEachInst(
const std::function<bool(Instruction*)>& f, bool run_on_debug_line_insts) { … }
inline bool BasicBlock::WhileEachInst(
const std::function<bool(const Instruction*)>& f,
bool run_on_debug_line_insts) const { … }
inline void BasicBlock::ForEachInst(const std::function<void(Instruction*)>& f,
bool run_on_debug_line_insts) { … }
inline void BasicBlock::ForEachInst(
const std::function<void(const Instruction*)>& f,
bool run_on_debug_line_insts) const { … }
inline bool BasicBlock::WhileEachPhiInst(
const std::function<bool(Instruction*)>& f, bool run_on_debug_line_insts) { … }
inline void BasicBlock::ForEachPhiInst(
const std::function<void(Instruction*)>& f, bool run_on_debug_line_insts) { … }
}
}
#endif