mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-26 17:51:02 +00:00
Add method comment for opt::Function::WhileEachInst (#2867)
Also, say that ForEachInst and ForEachParam process instructions/parameters in order.
This commit is contained in:
parent
6b07212659
commit
8d0ca43da5
@ -104,19 +104,24 @@ class Function {
|
||||
});
|
||||
}
|
||||
|
||||
// Runs the given function |f| on each instruction in this function, and
|
||||
// optionally on debug line instructions that might precede them.
|
||||
// Runs the given function |f| on instructions in this function, in order,
|
||||
// and optionally on debug line instructions that might precede them.
|
||||
void ForEachInst(const std::function<void(Instruction*)>& f,
|
||||
bool run_on_debug_line_insts = false);
|
||||
void ForEachInst(const std::function<void(const Instruction*)>& f,
|
||||
bool run_on_debug_line_insts = false) const;
|
||||
// Runs the given function |f| on instructions in this function, in order,
|
||||
// and optionally on debug line instructions that might precede them.
|
||||
// If |f| returns false, iteration is terminated and this function returns
|
||||
// false.
|
||||
bool WhileEachInst(const std::function<bool(Instruction*)>& f,
|
||||
bool run_on_debug_line_insts = false);
|
||||
bool WhileEachInst(const std::function<bool(const Instruction*)>& f,
|
||||
bool run_on_debug_line_insts = false) const;
|
||||
|
||||
// Runs the given function |f| on each parameter instruction in this function,
|
||||
// and optionally on debug line instructions that might precede them.
|
||||
// in order, and optionally on debug line instructions that might precede
|
||||
// them.
|
||||
void ForEachParam(const std::function<void(const Instruction*)>& f,
|
||||
bool run_on_debug_line_insts = false) const;
|
||||
void ForEachParam(const std::function<void(Instruction*)>& f,
|
||||
|
Loading…
Reference in New Issue
Block a user