diff options
author | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-02 22:15:41 +0000 |
---|---|---|
committer | Akira Hatanaka <ahatanaka@apple.com> | 2015-07-02 22:15:41 +0000 |
commit | 85365cd72a9d57c97a96dc845031068ced5aaf18 (patch) | |
tree | 7d401e422b776052a9c212a5ae49e1f44c4c1c6d /clang/lib/CodeGen/CodeGenFunction.h | |
parent | 56c70441dca2687bf019d96428728a8ab064a885 (diff) | |
download | llvm-85365cd72a9d57c97a96dc845031068ced5aaf18.zip llvm-85365cd72a9d57c97a96dc845031068ced5aaf18.tar.gz llvm-85365cd72a9d57c97a96dc845031068ced5aaf18.tar.bz2 |
Attach attribute "trap-func-name" to call sites of llvm.trap and llvm.debugtrap.
This is needed to use clang's command line option "-ftrap-function" for LTO and
enable changing the trap function name on a per-call-site basis.
rdar://problem/21225723
Differential Revision: http://reviews.llvm.org/D10831
llvm-svn: 241306
Diffstat (limited to 'clang/lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index cc427c9..fac71bf 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -2875,6 +2875,10 @@ public: /// conditional branch to it, for the -ftrapv checks. void EmitTrapCheck(llvm::Value *Checked); + /// \brief Emit a call to trap or debugtrap and attach function attribute + /// "trap-func-name" if specified. + llvm::CallInst *EmitTrapCall(llvm::Intrinsic::ID IntrID); + /// \brief Create a check for a function parameter that may potentially be /// declared as non-null. void EmitNonNullArgCheck(RValue RV, QualType ArgType, SourceLocation ArgLoc, |