summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorErich Keane <erich.keane@intel.com>2019-07-26 12:36:12 +0000
committerErich Keane <erich.keane@intel.com>2019-07-26 12:36:12 +0000
commit61478ec6ac9fc82d95edc6482e4d902d1a944c80 (patch)
treeda319c1b324a32878c930cd765f722f34c05884a /clang/lib
parent0ab0bb91aad5fd880399ab78bc06d7e140e66b84 (diff)
downloadbcm5719-llvm-61478ec6ac9fc82d95edc6482e4d902d1a944c80.tar.gz
bcm5719-llvm-61478ec6ac9fc82d95edc6482e4d902d1a944c80.zip
Make the CXXABIs respect the target's default calling convention.
SPIR targets need to have all functions be SPIR calling convention, however the CXXABIs were just returning CC_C in all non-'this-CC' cases. https://reviews.llvm.org/D65294 llvm-svn: 367103
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/ItaniumCXXABI.cpp2
-rw-r--r--clang/lib/AST/MicrosoftCXXABI.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/clang/lib/AST/ItaniumCXXABI.cpp b/clang/lib/AST/ItaniumCXXABI.cpp
index 727a905d08a..77fb5a1d33b 100644
--- a/clang/lib/AST/ItaniumCXXABI.cpp
+++ b/clang/lib/AST/ItaniumCXXABI.cpp
@@ -177,7 +177,7 @@ public:
if (!isVariadic && T.isWindowsGNUEnvironment() &&
T.getArch() == llvm::Triple::x86)
return CC_X86ThisCall;
- return CC_C;
+ return Context.getTargetInfo().getDefaultCallingConv();
}
// We cheat and just check that the class has a vtable pointer, and that it's
diff --git a/clang/lib/AST/MicrosoftCXXABI.cpp b/clang/lib/AST/MicrosoftCXXABI.cpp
index 4dc4156df9c..444e55f777f 100644
--- a/clang/lib/AST/MicrosoftCXXABI.cpp
+++ b/clang/lib/AST/MicrosoftCXXABI.cpp
@@ -82,7 +82,7 @@ public:
if (!isVariadic &&
Context.getTargetInfo().getTriple().getArch() == llvm::Triple::x86)
return CC_X86ThisCall;
- return CC_C;
+ return Context.getTargetInfo().getDefaultCallingConv();
}
bool isNearlyEmpty(const CXXRecordDecl *RD) const override {
OpenPOWER on IntegriCloud