aboutsummaryrefslogtreecommitdiff
path: root/lib/AST/ASTContext.cpp
diff options
context:
space:
mode:
authorTimur Iskhodzhanov <timurrrr@google.com>2012-07-12 09:50:54 +0000
committerTimur Iskhodzhanov <timurrrr@google.com>2012-07-12 09:50:54 +0000
commit8f88a1dcc57cfe8580eb1558a783ad8499bfe8e0 (patch)
treefdb16582b07391031a3035c50ba0c48ac888c057 /lib/AST/ASTContext.cpp
parent9a50249cd35f3d9d4d2b194a3edd6815ccf746d7 (diff)
[Windows] Use thiscall as the default calling convention for class methods. PR12785
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@160121 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/AST/ASTContext.cpp')
-rw-r--r--lib/AST/ASTContext.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/AST/ASTContext.cpp b/lib/AST/ASTContext.cpp
index 27e4de926d..2a1521e21e 100644
--- a/lib/AST/ASTContext.cpp
+++ b/lib/AST/ASTContext.cpp
@@ -7098,9 +7098,15 @@ bool ASTContext::DeclMustBeEmitted(const Decl *D) {
return true;
}
-CallingConv ASTContext::getDefaultMethodCallConv() {
+CallingConv ASTContext::getDefaultCXXMethodCallConv(bool isVariadic) {
// Pass through to the C++ ABI object
- return ABI->getDefaultMethodCallConv();
+ return ABI->getDefaultMethodCallConv(isVariadic);
+}
+
+CallingConv ASTContext::getCanonicalCallConv(CallingConv CC) const {
+ if (CC == CC_C && !LangOpts.MRTD && getTargetInfo().getCXXABI() != CXXABI_Microsoft)
+ return CC_Default;
+ return CC;
}
bool ASTContext::isNearlyEmpty(const CXXRecordDecl *RD) const {