diff options
author | John McCall <rjmccall@apple.com> | 2012-07-07 06:41:13 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2012-07-07 06:41:13 +0000 |
commit | 0f3d0970dcdf6cf17550b86838dff12813968dbc (patch) | |
tree | 911b6054fa35afefb9c3db10172fca6e87d6a475 /lib/CodeGen/CodeGenTypes.h | |
parent | a437b84765d6b98d57f2789435ad641f1dd61474 (diff) |
Distinguish more carefully between free functions and C++ instance methods
in the ABI arrangement, and leave a hook behind so that we can easily
tweak CCs on platforms that use different CCs by default for C++
instance methods.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159894 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenTypes.h')
-rw-r--r-- | lib/CodeGen/CodeGenTypes.h | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/lib/CodeGen/CodeGenTypes.h b/lib/CodeGen/CodeGenTypes.h index ba2b3ae549..3c29d2d746 100644 --- a/lib/CodeGen/CodeGenTypes.h +++ b/lib/CodeGen/CodeGenTypes.h @@ -189,26 +189,32 @@ public: const CGFunctionInfo &arrangeCXXDestructor(const CXXDestructorDecl *D, CXXDtorType Type); - const CGFunctionInfo &arrangeFunctionCall(const CallArgList &Args, - const FunctionType *Ty); - const CGFunctionInfo &arrangeFunctionCall(QualType ResTy, - const CallArgList &args, - const FunctionType::ExtInfo &info, - RequiredArgs required); - - const CGFunctionInfo &arrangeFunctionType(CanQual<FunctionProtoType> Ty); - const CGFunctionInfo &arrangeFunctionType(CanQual<FunctionNoProtoType> Ty); + const CGFunctionInfo &arrangeFreeFunctionCall(const CallArgList &Args, + const FunctionType *Ty); + const CGFunctionInfo &arrangeFreeFunctionCall(QualType ResTy, + const CallArgList &args, + FunctionType::ExtInfo info, + RequiredArgs required); + + const CGFunctionInfo &arrangeCXXMethodCall(const CallArgList &args, + const FunctionProtoType *type, + RequiredArgs required); + + const CGFunctionInfo &arrangeFreeFunctionType(CanQual<FunctionProtoType> Ty); + const CGFunctionInfo &arrangeFreeFunctionType(CanQual<FunctionNoProtoType> Ty); const CGFunctionInfo &arrangeCXXMethodType(const CXXRecordDecl *RD, const FunctionProtoType *FTP); - /// Retrieves the ABI information for the given function signature. - /// This is the "core" routine to which all the others defer. + /// "Arrange" the LLVM information for a call or type with the given + /// signature. This is largely an internal method; other clients + /// should use one of the above routines, which ultimately defer to + /// this. /// /// \param argTypes - must all actually be canonical as params - const CGFunctionInfo &arrangeFunctionType(CanQualType returnType, - ArrayRef<CanQualType> argTypes, - const FunctionType::ExtInfo &info, - RequiredArgs args); + const CGFunctionInfo &arrangeLLVMFunctionInfo(CanQualType returnType, + ArrayRef<CanQualType> argTypes, + FunctionType::ExtInfo info, + RequiredArgs args); /// \brief Compute a new LLVM record layout object for the given record. CGRecordLayout *ComputeRecordLayout(const RecordDecl *D, |