llvm-project/llvm
Derek Schuff ffa143ce81 [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
2015-11-10 00:30:57 +00:00
..
autoconf Don't use bashism/kshism of test ==. From Kamil Rytarowski. 2015-09-12 16:30:32 +00:00
bindings Fix `llvm-config` to adapt to the install environment. 2015-11-09 23:15:38 +00:00
cmake [CMake] Bug 25059 - CMake libllvm.so.$MAJOR.$MINOR shared object name not compatible with ldconfig 2015-11-04 23:11:12 +00:00
docs Deprecate Autoconf 2015-11-09 21:54:55 +00:00
examples examples: Remove implicit ilist iterator conversions, NFC 2015-11-07 00:55:46 +00:00
include [PGO] Make indexed value profile data more compact 2015-11-10 00:24:45 +00:00
lib [WebAssembly] Support 'unreachable' expression 2015-11-10 00:30:57 +00:00
projects [CMake] Disable adding the test suite as a projects subdirectory 2015-10-28 18:36:56 +00:00
resources
test [WebAssembly] Support 'unreachable' expression 2015-11-10 00:30:57 +00:00
tools Simplify some APIs I was cleaning up while fixing -Wpessimizing-move warning 2015-11-09 23:51:45 +00:00
unittests [PGO] Make indexed value profile data more compact 2015-11-10 00:24:45 +00:00
utils [AsmParser] Generalize matching for grammars without mnemonic-lead statements 2015-11-09 00:46:46 +00:00
.arcconfig
.clang-format
.clang-tidy
.gitignore
CMakeLists.txt Relax the check for ninja. 2015-11-04 19:18:11 +00:00
CODE_OWNERS.TXT Add myself as the the code owner for the AVR backend 2015-10-28 00:24:54 +00:00
CREDITS.TXT
LICENSE.TXT
LLVMBuild.txt
Makefile
Makefile.common
Makefile.config.in
Makefile.rules Create Makefile variables for 'share' and 'libexec' 2015-11-09 16:10:00 +00:00
README.txt
configure Deprecate Autoconf 2015-11-09 21:54:55 +00:00
llvm.spec.in

README.txt

Low Level Virtual Machine (LLVM)
================================

This directory and its subdirectories contain source code for LLVM,
a toolkit for the construction of highly optimized compilers,
optimizers, and runtime environments.

LLVM is open source software. You may freely distribute it under the terms of
the license agreement found in LICENSE.txt.

Please see the documentation provided in docs/ for further
assistance with LLVM, and in particular docs/GettingStarted.rst for getting
started with LLVM and docs/README.txt for an overview of LLVM's
documentation setup.

If you're writing a package for LLVM, see docs/Packaging.rst for our
suggestions.