Skip to content

Commit

Permalink
Remove CallingConvMethodType
Browse files Browse the repository at this point in the history
This seems to be an old vestage of a previous implementation of getting
the default calling convention, and everything is now using
CXXABI/ASTContext's getDefaultCallingConvention.  Remove it, since it
isn't doing anything.

llvm-svn: 367039
  • Loading branch information
Erich Keane committed Jul 25, 2019
1 parent ad137fa commit 3930948
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
8 changes: 1 addition & 7 deletions clang/include/clang/Basic/TargetInfo.h
Expand Up @@ -1249,15 +1249,9 @@ class TargetInfo : public virtual TransferrableTargetInfo,
bool isBigEndian() const { return BigEndian; }
bool isLittleEndian() const { return !BigEndian; }

enum CallingConvMethodType {
CCMT_Unknown,
CCMT_Member,
CCMT_NonMember
};

/// Gets the default calling convention for the given target and
/// declaration context.
virtual CallingConv getDefaultCallingConv(CallingConvMethodType MT) const {
virtual CallingConv getDefaultCallingConv() const {
// Not all targets will specify an explicit calling convention that we can
// express. This will always do the right thing, even though it's not
// an explicit calling convention.
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/AST/ASTContext.cpp
Expand Up @@ -10035,7 +10035,7 @@ CallingConv ASTContext::getDefaultCallingConvention(bool IsVariadic,
break;
}
}
return Target->getDefaultCallingConv(TargetInfo::CCMT_Unknown);
return Target->getDefaultCallingConv();
}

bool ASTContext::isNearlyEmpty(const CXXRecordDecl *RD) const {
Expand Down
2 changes: 1 addition & 1 deletion clang/lib/Basic/Targets/SPIR.h
Expand Up @@ -88,7 +88,7 @@ class LLVM_LIBRARY_VISIBILITY SPIRTargetInfo : public TargetInfo {
: CCCR_Warning;
}

CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override {
CallingConv getDefaultCallingConv() const override {
return CC_SpirFunction;
}

Expand Down
6 changes: 3 additions & 3 deletions clang/lib/Basic/Targets/X86.h
Expand Up @@ -320,8 +320,8 @@ class LLVM_LIBRARY_VISIBILITY X86TargetInfo : public TargetInfo {
}
}

CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override {
return MT == CCMT_Member ? CC_X86ThisCall : CC_C;
CallingConv getDefaultCallingConv() const override {
return CC_C;
}

bool hasSjLjLowering() const override { return true; }
Expand Down Expand Up @@ -659,7 +659,7 @@ class LLVM_LIBRARY_VISIBILITY X86_64TargetInfo : public X86TargetInfo {
}
}

CallingConv getDefaultCallingConv(CallingConvMethodType MT) const override {
CallingConv getDefaultCallingConv() const override {
return CC_C;
}

Expand Down

0 comments on commit 3930948

Please sign in to comment.