summaryrefslogtreecommitdiff
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-08 03:34:12 +0000
committerChris Lattner <sabre@nondot.org>2003-05-08 03:34:12 +0000
commit4804824047a7a3b87022541eb143063fffad7ddc (patch)
tree93ad60ecebef80040462e83f07143f5c4e46bd87 /include/llvm/Function.h
parenteea35433d28e40956b67e5717e7058c30d1cf375 (diff)
downloadllvm-4804824047a7a3b87022541eb143063fffad7ddc.tar.gz
llvm-4804824047a7a3b87022541eb143063fffad7ddc.tar.bz2
llvm-4804824047a7a3b87022541eb143063fffad7ddc.tar.xz
Initial support for intrinsic functions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@6033 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index fe8216210d..3d6288cb51 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -87,6 +87,16 @@ public:
///
virtual bool isExternal() const { return BasicBlocks.empty(); }
+ /// getIntrinsicID - This method returns the ID number of the specified
+ /// function, or LLVMIntrinsic::not_intrinsic if the function is not an
+ /// instrinsic, or if the pointer is null. This value is always defined to be
+ /// zero to allow easy checking for whether a function is intrinsic or not.
+ /// The particular intrinsic functions which correspond to this value are
+ /// defined in llvm/Intrinsics.h.
+ ///
+ unsigned getIntrinsicID() const;
+ bool isIntrinsic() const { return getIntrinsicID() != 0; }
+
// getNext/Prev - Return the next or previous function in the list. These
// methods should never be used directly, and are only used to implement the
// function list as part of the module.