diff options
Diffstat (limited to 'clang/lib/CodeGen/CGCall.h')
-rw-r--r-- | clang/lib/CodeGen/CGCall.h | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGCall.h b/clang/lib/CodeGen/CGCall.h index 53432a2a9ef..ebf801dcaad 100644 --- a/clang/lib/CodeGen/CGCall.h +++ b/clang/lib/CodeGen/CGCall.h @@ -60,9 +60,14 @@ namespace CodeGen { ABIArgInfo info; }; - /// The LLVM::CallingConv to use for this function. + /// The LLVM::CallingConv to use for this function (as specified by the + /// user). unsigned CallingConvention; + /// The LLVM::CallingConv to actually use for this function, which may + /// depend on the ABI. + unsigned EffectiveCallingConvention; + unsigned NumArgs; ArgInfo *Args; @@ -82,8 +87,19 @@ namespace CodeGen { unsigned arg_size() const { return NumArgs; } + /// getCallingConvention - Return the user specified calling + /// convention. unsigned getCallingConvention() const { return CallingConvention; } + /// getEffectiveCallingConvention - Return the actual calling convention to + /// use, which may depend on the ABI. + unsigned getEffectiveCallingConvention() const { + return EffectiveCallingConvention; + } + void setEffectiveCallingConvention(unsigned Value) { + EffectiveCallingConvention = Value; + } + QualType getReturnType() const { return Args[0].type; } ABIArgInfo &getReturnInfo() { return Args[0].info; } |