diff options
author | Derek Schuff <dschuff@google.com> | 2016-05-10 17:44:55 +0000 |
---|---|---|
committer | Derek Schuff <dschuff@google.com> | 2016-05-10 17:44:55 +0000 |
commit | 8179be4897db025dd7256bbee7c0d9e5794a2b34 (patch) | |
tree | 78dc08b1c3578d7505ee2565cc1f8939f6a93c50 /clang/lib/CodeGen/CGCXXABI.h | |
parent | 09b2492387267439d20f59725bd8caf0a24d0a41 (diff) | |
download | bcm5719-llvm-8179be4897db025dd7256bbee7c0d9e5794a2b34.tar.gz bcm5719-llvm-8179be4897db025dd7256bbee7c0d9e5794a2b34.zip |
Introduce CGCXXABI::canCallMismatchedFunctionType
llvm-svn: 269089
Diffstat (limited to 'clang/lib/CodeGen/CGCXXABI.h')
-rw-r--r-- | clang/lib/CodeGen/CGCXXABI.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CGCXXABI.h b/clang/lib/CodeGen/CGCXXABI.h index 3f240b1802b..8c0f6c2efd5 100644 --- a/clang/lib/CodeGen/CGCXXABI.h +++ b/clang/lib/CodeGen/CGCXXABI.h @@ -106,6 +106,16 @@ public: virtual bool hasMostDerivedReturn(GlobalDecl GD) const { return false; } + /// Returns true if the target allows calling a function through a pointer + /// with a different signature than the actual function (or equivalently, + /// bitcasting a function or function pointer to a different function type). + /// In principle in the most general case this could depend on the target, the + /// calling convention, and the actual types of the arguments and return + /// value. Here it just means whether the signature mismatch could *ever* be + /// allowed; in other words, does the target do strict checking of signatures + /// for all calls. + virtual bool canCallMismatchedFunctionType() const { return true; } + /// If the C++ ABI requires the given type be returned in a particular way, /// this method sets RetAI and returns true. virtual bool classifyReturnType(CGFunctionInfo &FI) const = 0; |