diff options
author | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:24:53 +0000 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2009-09-11 22:24:53 +0000 |
commit | 7feafc70d94c27d1ab90e663ac5f70e243410ba6 (patch) | |
tree | 56155e8b33eb9581bef7980e512ac60f03e841c8 /clang/lib/CodeGen/CGCall.h | |
parent | b918900995da92dda69f6cd808148e03c3016a2c (diff) | |
download | bcm5719-llvm-7feafc70d94c27d1ab90e663ac5f70e243410ba6.tar.gz bcm5719-llvm-7feafc70d94c27d1ab90e663ac5f70e243410ba6.zip |
Add CallingConvention argument to CGFunctionInfo.
- Currently unused.
llvm-svn: 81581
Diffstat (limited to 'clang/lib/CodeGen/CGCall.h')
-rw-r--r-- | clang/lib/CodeGen/CGCall.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 2c1048d935e..53432a2a9ef 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -60,6 +60,9 @@ namespace CodeGen { ABIArgInfo info; }; + /// The LLVM::CallingConv to use for this function. + unsigned CallingConvention; + unsigned NumArgs; ArgInfo *Args; @@ -67,7 +70,8 @@ namespace CodeGen { typedef const ArgInfo *const_arg_iterator; typedef ArgInfo *arg_iterator; - CGFunctionInfo(QualType ResTy, + CGFunctionInfo(unsigned CallingConvention, + QualType ResTy, const llvm::SmallVector<QualType, 16> &ArgTys); ~CGFunctionInfo() { delete[] Args; } @@ -78,21 +82,26 @@ namespace CodeGen { unsigned arg_size() const { return NumArgs; } + unsigned getCallingConvention() const { return CallingConvention; } + QualType getReturnType() const { return Args[0].type; } ABIArgInfo &getReturnInfo() { return Args[0].info; } const ABIArgInfo &getReturnInfo() const { return Args[0].info; } void Profile(llvm::FoldingSetNodeID &ID) { + ID.AddInteger(getCallingConvention()); getReturnType().Profile(ID); for (arg_iterator it = arg_begin(), ie = arg_end(); it != ie; ++it) it->type.Profile(ID); } template<class Iterator> static void Profile(llvm::FoldingSetNodeID &ID, + unsigned CallingConvention, QualType ResTy, Iterator begin, Iterator end) { + ID.AddInteger(CallingConvention); ResTy.Profile(ID); for (; begin != end; ++begin) begin->Profile(ID); |