forked from OSchip/llvm-project
Let attribute((cdecl)) and company override -mrtd default calling convention.
llvm-svn: 136971
This commit is contained in:
parent
a70fbfd577
commit
30097b7c41
|
@ -1256,7 +1256,7 @@ public:
|
|||
/// \brief Retrieves the canonical representation of the given
|
||||
/// calling convention.
|
||||
CallingConv getCanonicalCallConv(CallingConv CC) const {
|
||||
if (CC == CC_C)
|
||||
if (!LangOpts.MRTD && CC == CC_C)
|
||||
return CC_Default;
|
||||
return CC;
|
||||
}
|
||||
|
|
|
@ -3482,7 +3482,7 @@ static bool handleFunctionTypeAttr(TypeProcessingState &state,
|
|||
return true;
|
||||
}
|
||||
|
||||
if (CCOld != CC_Default) {
|
||||
if (CCOld != (S.LangOpts.MRTD ? CC_X86StdCall : CC_Default)) {
|
||||
// Should we diagnose reapplications of the same convention?
|
||||
S.Diag(attr.getLoc(), diag::err_attributes_are_not_compatible)
|
||||
<< FunctionType::getNameForCallConv(CC)
|
||||
|
|
Loading…
Reference in New Issue