[ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
authorChad Rosier <mcrosier@apple.com>
Tue, 29 Jan 2013 23:31:22 +0000 (23:31 +0000)
committerChad Rosier <mcrosier@apple.com>
Tue, 29 Jan 2013 23:31:22 +0000 (23:31 +0000)
commitae229d599b8ccf5475fbdf2459fc54f2cce3dec7
tree29d57285b3689ce43fe6d800e68e6a2caea116a6
parent01edb9d7d1888604e1b46183a2e82c1c7142d379
[ubsan] Implement the -fcatch-undefined-behavior flag using a trapping
implementation; this is much more inline with the original implementation
(i.e., pre-ubsan) and does not require run-time library support.

The trapping implementation can be invoked using either '-fcatch-undefined-behavior'
or '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error', with the latter
being preferred.  Eventually, the -fcatch-undefined-behavior' flag will be removed.

llvm-svn: 173848
12 files changed:
clang/docs/UsersManual.rst
clang/include/clang/Basic/Sanitizers.def
clang/include/clang/Driver/Options.td
clang/include/clang/Frontend/CodeGenOptions.def
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/lib/Driver/SanitizerArgs.h
clang/lib/Driver/Tools.cpp
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/catch-undef-behavior.c
clang/test/Driver/fsanitize.c