[clang] Version support for UBSan handlers
authorFilipe Cabecinhas <me@filcab.net>
Mon, 12 Dec 2016 16:18:40 +0000 (16:18 +0000)
committerFilipe Cabecinhas <me@filcab.net>
Mon, 12 Dec 2016 16:18:40 +0000 (16:18 +0000)
commit322ecd901b52650fcd0ec091a9a01c3483b6f57d
treee1c69a0b80aab8db547b01700d7211b6f6a31770
parenta64d4dc22fe1b40a8aa0fa83789878862fb19696
[clang] Version support for UBSan handlers

This adds a way for us to version any UBSan handler by itself.
The patch overrides D21289 for a better implementation (we're able to
rev up a single handler).

After this, then we can land a slight modification of D19667+D19668.

We probably don't want to keep all the versions in compiler-rt (maybe we
want to deprecate on one release and remove the old handler on the next
one?), but with this patch we will loudly fail to compile when mixing
incompatible handler calls, instead of silently compiling and then
providing bad error messages.

Reviewers: kcc, samsonov, rsmith, vsk

Subscribers: cfe-commits

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

llvm-svn: 289444
clang/lib/CodeGen/CGBuiltin.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGClass.cpp
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CGExprScalar.cpp
clang/lib/CodeGen/CodeGenFunction.cpp
clang/lib/CodeGen/CodeGenFunction.h