summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/CGCXXABI.h
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2015-06-19 01:51:54 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2015-06-19 01:51:54 +0000
commitcbd703b159c95f7f4b7fa34071708aef6d3e5178 (patch)
tree88b4ebdc6a6ca8cfd5dc256cfeb20c0d1d2f7aa1 /lib/CodeGen/CGCXXABI.h
parent683de155d77ede36b988847a171ddf8e66a4ac72 (diff)
Implement diagnostic mode for -fsanitize=cfi*, -fsanitize=cfi-diag.
This causes programs compiled with this flag to print a diagnostic when a control flow integrity check fails instead of aborting. Diagnostics are printed using UBSan's runtime library. The main motivation of this feature over -fsanitize=vptr is fidelity with the -fsanitize=cfi implementation: the diagnostics are printed under exactly the same conditions as those which would cause -fsanitize=cfi to abort the program. This means that the same restrictions apply regarding compiling all translation units with -fsanitize=cfi, cross-DSO virtual calls are forbidden, etc. Differential Revision: http://reviews.llvm.org/D10268 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@240109 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGCXXABI.h')
-rw-r--r--lib/CodeGen/CGCXXABI.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/CGCXXABI.h b/lib/CodeGen/CGCXXABI.h
index 2c7392188f..b6b4ee6850 100644
--- a/lib/CodeGen/CGCXXABI.h
+++ b/lib/CodeGen/CGCXXABI.h
@@ -366,7 +366,8 @@ public:
virtual llvm::Value *getVirtualFunctionPointer(CodeGenFunction &CGF,
GlobalDecl GD,
llvm::Value *This,
- llvm::Type *Ty) = 0;
+ llvm::Type *Ty,
+ SourceLocation Loc) = 0;
/// Emit the ABI-specific virtual destructor call.
virtual llvm::Value *