summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGBuiltin.cpp
diff options
context:
space:
mode:
authorFilipe Cabecinhas <me@filcab.net>2016-12-12 16:18:40 +0000
committerFilipe Cabecinhas <me@filcab.net>2016-12-12 16:18:40 +0000
commit322ecd901b52650fcd0ec091a9a01c3483b6f57d (patch)
treee1c69a0b80aab8db547b01700d7211b6f6a31770 /clang/lib/CodeGen/CGBuiltin.cpp
parenta64d4dc22fe1b40a8aa0fa83789878862fb19696 (diff)
downloadbcm5719-llvm-322ecd901b52650fcd0ec091a9a01c3483b6f57d.tar.gz
bcm5719-llvm-322ecd901b52650fcd0ec091a9a01c3483b6f57d.zip
[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
Diffstat (limited to 'clang/lib/CodeGen/CGBuiltin.cpp')
-rw-r--r--clang/lib/CodeGen/CGBuiltin.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGBuiltin.cpp b/clang/lib/CodeGen/CGBuiltin.cpp
index 7eaf0f74b74..85170409563 100644
--- a/clang/lib/CodeGen/CGBuiltin.cpp
+++ b/clang/lib/CodeGen/CGBuiltin.cpp
@@ -959,8 +959,8 @@ RValue CodeGenFunction::EmitBuiltinExpr(const FunctionDecl *FD,
SanitizerScope SanScope(this);
EmitCheck(std::make_pair(static_cast<llvm::Value *>(Builder.getFalse()),
SanitizerKind::Unreachable),
- "builtin_unreachable", EmitCheckSourceLocation(E->getExprLoc()),
- None);
+ SanitizerHandler::BuiltinUnreachable,
+ EmitCheckSourceLocation(E->getExprLoc()), None);
} else
Builder.CreateUnreachable();
OpenPOWER on IntegriCloud