[CodeGen] Add a -trap-unreachable option for debugging
commit78a2fedd78a971449f49a67b960529d92e84480b
authorDavid Green <david.green@arm.com>
Mon, 12 Feb 2018 11:06:27 +0000 (12 11:06 +0000)
committerDavid Green <david.green@arm.com>
Mon, 12 Feb 2018 11:06:27 +0000 (12 11:06 +0000)
tree693aa53293f328a912d289750ecf306c0412e5c4
parent4d4c57240a75bc23e21de906c4fae160baebe275
[CodeGen] Add a -trap-unreachable option for debugging

Add a common -trap-unreachable option, similar to the target
specific hexagon equivalent, which has been replaced. This
turns unreachable instructions into traps, which is useful for
debugging.

Differential Revision: https://reviews.llvm.org/D42965

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@324880 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/LLVMTargetMachine.cpp
lib/Target/Hexagon/HexagonTargetMachine.cpp
test/CodeGen/ARM/trap-unreachable.ll [new file with mode: 0644]
test/CodeGen/Hexagon/trap-unreachable.ll