ForEachInst optionally runs on attached debug line insts
authorDavid Neto <dneto@google.com>
Sat, 20 Aug 2016 13:47:00 +0000 (09:47 -0400)
committerDavid Neto <dneto@google.com>
Thu, 25 Aug 2016 15:43:22 +0000 (11:43 -0400)
commit97fc6aa3b88e63d9bde76f92cdf06e723f337d92
tree2759ad675496dccf908b8c41d2eb60b065e8282e
parente96a881b0bb7e42251566e12b8788134c9917aaf
ForEachInst optionally runs on attached debug line insts

Also:
- Add const forms of ForEachInst
- Rewrite Module::ToBinary in terms of ForEachInst
- Add Instruction::ToBinaryWithoutAttachedDebugInsts
- Delete the ToBinary method on Function, BasicBlock, and Instruction
  since it can now be implemented with ForEachInst in a less confusing
  way, e.g. without recursion.
- Preserve debug line instructions on OpFunctionEnd (and store that
  instruction as a unique-pointer, for regularity).
source/opt/basic_block.h
source/opt/function.cpp
source/opt/function.h
source/opt/instruction.cpp
source/opt/instruction.h
source/opt/ir_loader.cpp
source/opt/module.cpp
source/opt/module.h
test/opt/test_def_use.cpp
test/opt/test_ir_loader.cpp