summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Object/IRObjectFile.cpp
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@google.com>2015-11-10 00:30:57 +0000
committerDerek Schuff <dschuff@google.com>2015-11-10 00:30:57 +0000
commitffa143ce814101fb1277ba65b20bdf86775d0b32 (patch)
tree99d79c8b7ff474be111642d8722dd9217089ea17 /llvm/lib/Object/IRObjectFile.cpp
parent6d87f28afd467df3370d43af37760ce9b3d1a179 (diff)
downloadbcm5719-llvm-ffa143ce814101fb1277ba65b20bdf86775d0b32.tar.gz
bcm5719-llvm-ffa143ce814101fb1277ba65b20bdf86775d0b32.zip
[WebAssembly] Support 'unreachable' expression
Lower LLVM's 'unreachable' terminator to ISD::TRAP, and lower ISD::TRAP to wasm's 'unreachable' expression. WebAssembly type-checks expressions, but a noreturn function with a return type that doesn't match the context will cause a check failure. So we lower LLVM 'unreachable' to ISD::TRAP and then lower that to WebAssembly's 'unreachable' expression, which typechecks in any context and causes a trap if executed. Differential Revision: http://reviews.llvm.org/D14515 llvm-svn: 252566
Diffstat (limited to 'llvm/lib/Object/IRObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud