diff options
author | Charles Davis <cdavis@mines.edu> | 2010-10-29 03:25:11 +0000 |
---|---|---|
committer | Charles Davis <cdavis@mines.edu> | 2010-10-29 03:25:11 +0000 |
commit | 31575f758c4defb5bf7b54cbf0238e414ff4e3b3 (patch) | |
tree | 47ea520f8c699e6d8ba7b6bfbe8c5f88e6c01646 /clang/lib/AST/MicrosoftCXXABI.cpp | |
parent | 821de3d161fae86fc1182634ac5dd1fd236b41ef (diff) | |
download | bcm5719-llvm-31575f758c4defb5bf7b54cbf0238e414ff4e3b3.tar.gz bcm5719-llvm-31575f758c4defb5bf7b54cbf0238e414ff4e3b3.zip |
Add a hook to the CXXABI object to get the default method calling convention.
This isn't used yet, because someone more experienced than I needs to look
at the type system about gutting getCanonicalCallConv().
llvm-svn: 117638
Diffstat (limited to 'clang/lib/AST/MicrosoftCXXABI.cpp')
-rw-r--r-- | clang/lib/AST/MicrosoftCXXABI.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/AST/MicrosoftCXXABI.cpp b/clang/lib/AST/MicrosoftCXXABI.cpp index 87b77673925..b1f032b897a 100644 --- a/clang/lib/AST/MicrosoftCXXABI.cpp +++ b/clang/lib/AST/MicrosoftCXXABI.cpp @@ -13,6 +13,7 @@ //===----------------------------------------------------------------------===// #include "CXXABI.h" +#include "clang/Basic/TargetInfo.h" #include "clang/AST/ASTContext.h" #include "clang/AST/Type.h" #include "clang/AST/DeclCXX.h" @@ -26,6 +27,13 @@ public: MicrosoftCXXABI(ASTContext &Ctx) : Context(Ctx) { } unsigned getMemberPointerSize(const MemberPointerType *MPT) const; + + CallingConv getDefaultMethodCallConv() const { + if (Context.Target.getTriple().getArch() == llvm::Triple::x86) + return CC_X86ThisCall; + else + return CC_C; + } }; } |