diff options
author | Tanya Lattner <tonic@nondot.org> | 2003-07-31 04:05:50 +0000 |
---|---|---|
committer | Tanya Lattner <tonic@nondot.org> | 2003-07-31 04:05:50 +0000 |
commit | 741bb0019de9aa28a731b4eef2422a3397f99cd0 (patch) | |
tree | e34afdf407d76effeee66cf18ee23db83a5bfeec /include | |
parent | 0ad1361837d69b388e0e108862e5eadbde7ea682 (diff) | |
download | external_llvm-741bb0019de9aa28a731b4eef2422a3397f99cd0.zip external_llvm-741bb0019de9aa28a731b4eef2422a3397f99cd0.tar.gz external_llvm-741bb0019de9aa28a731b4eef2422a3397f99cd0.tar.bz2 |
Added function to determine if an Instruction may trap.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7442 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Instruction.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/llvm/Instruction.h b/include/llvm/Instruction.h index d09c140..1b85e91 100644 --- a/include/llvm/Instruction.h +++ b/include/llvm/Instruction.h @@ -97,7 +97,13 @@ public: bool isCommutative() const { return isCommutative(getOpcode()); } static bool isCommutative(unsigned op); - + /// isTrappingInstruction - Return true if the instruction may trap. + /// + bool isTrappingInstruction() const { + return isTrappingInstruction(getOpcode()); + } + static bool isTrappingInstruction(unsigned op); + virtual void print(std::ostream &OS) const; /// Methods for support type inquiry through isa, cast, and dyn_cast: |