Patch by Vadim Chugunov
authorYaron Keren <yaron.keren@gmail.com>
Sat, 19 Apr 2014 13:47:43 +0000 (13:47 +0000)
committerYaron Keren <yaron.keren@gmail.com>
Sat, 19 Apr 2014 13:47:43 +0000 (13:47 +0000)
commit64b2297786f7fd6f5fa24cdd4db0298fbf211466
treec5250834c0fd832fbdb7363822269f603cee844f
parent2fa9e6ca34a1f696904c0b8006c91d64679c2b51
Patch by Vadim Chugunov

Win64 stack unwinder gets confused when execution flow "falls through" after
a call to 'noreturn' function. This fixes the "missing epilogue" problem by
emitting a trap instruction for IR 'unreachable' on x86_x64-pc-windows.

A secondary use for it would be for anyone wanting to make double-sure that
'noreturn' functions, indeed, do not return.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206684 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetOptions.h
lib/CodeGen/SelectionDAG/FastISel.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
lib/Target/X86/X86TargetMachine.cpp
test/CodeGen/X86/br-fold.ll