aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Function.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-05-06 20:26:26 +0000
committerChris Lattner <sabre@nondot.org>2005-05-06 20:26:26 +0000
commit3340ffe85431f705e91aa4d4b64207f80d0d8c2f (patch)
treea155906865d7e65af09bb816149d4fdedd1420b3 /include/llvm/Function.h
parenta62e52ab181c10738066e65a6dcc6c3cdfa5d806 (diff)
downloadexternal_llvm-3340ffe85431f705e91aa4d4b64207f80d0d8c2f.zip
external_llvm-3340ffe85431f705e91aa4d4b64207f80d0d8c2f.tar.gz
external_llvm-3340ffe85431f705e91aa4d4b64207f80d0d8c2f.tar.bz2
Add support for explicit calling conventions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21745 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Function.h')
-rw-r--r--include/llvm/Function.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/llvm/Function.h b/include/llvm/Function.h
index edd8861..38f33ce 100644
--- a/include/llvm/Function.h
+++ b/include/llvm/Function.h
@@ -66,6 +66,7 @@ private:
ArgumentListType ArgumentList; // The formal arguments
SymbolTable *SymTab;
+ unsigned CallingConvention;
friend class SymbolTableListTraits<Function, Module, Module>;
@@ -106,6 +107,12 @@ public:
unsigned getIntrinsicID() const;
bool isIntrinsic() const { return getIntrinsicID() != 0; }
+ /// getCallingConv()/setCallingConv(uint) - These method get and set the
+ /// calling convention of this function. The enum values for the known
+ /// calling conventions are defined in CallingConv.h.
+ unsigned getCallingConv() const { return CallingConvention; }
+ void setCallingConv(unsigned CC) { CallingConvention = CC; }
+
/// renameLocalSymbols - This method goes through the Function's symbol table
/// and renames any symbols that conflict with symbols at global scope. This
/// is required before printing out to a textual form, to ensure that there is