diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-20 21:29:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2013-10-20 21:29:19 +0000 |
commit | b453cd64a79cc7cda87fadcde8aba5fd6ca9e43d (patch) | |
tree | cde47c0f9156e040c543e7bedddd0a970ca03d5d /clang/lib/CodeGen/TargetInfo.h | |
parent | f7ef3fd8109b5c7144d622b6da801ce0ba4bba69 (diff) | |
download | bcm5719-llvm-b453cd64a79cc7cda87fadcde8aba5fd6ca9e43d.tar.gz bcm5719-llvm-b453cd64a79cc7cda87fadcde8aba5fd6ca9e43d.zip |
Implement function type checker for the undefined behavior sanitizer.
This uses function prefix data to store function type information at the
function pointer.
Differential Revision: http://llvm-reviews.chandlerc.com/D1338
llvm-svn: 193058
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.h')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.h b/clang/lib/CodeGen/TargetInfo.h index a7fb88649a3..f631f3102d0 100644 --- a/clang/lib/CodeGen/TargetInfo.h +++ b/clang/lib/CodeGen/TargetInfo.h @@ -21,6 +21,7 @@ #include "llvm/ADT/SmallString.h" namespace llvm { + class Constant; class GlobalValue; class Type; class Value; @@ -136,6 +137,13 @@ namespace clang { return ""; } + /// Return a constant used by UBSan as a signature to identify functions + /// possessing type information, or 0 if the platform is unsupported. + virtual llvm::Constant *getUBSanFunctionSignature( + CodeGen::CodeGenModule &CGM) const { + return 0; + } + /// Determine whether a call to an unprototyped functions under /// the given calling convention should use the variadic /// convention or the non-variadic convention. |