Skip to content

Commit fe37160

Browse files
committed
Use mangling scheme info from TargetInfo.
1 parent 34db4ba commit fe37160

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

clang/lib/Sema/SemaChecking.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4770,7 +4770,7 @@ ExprResult Sema::CheckOSLogFormatStringArg(Expr *Arg) {
47704770
/// target and calling convention.
47714771
static bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) {
47724772
const TargetInfo &TI = S.Context.getTargetInfo();
4773-
bool IsMicrosoftABI = TI.getCXXABI().isMicrosoft();
4773+
bool IsMicrosoftCC = TI.shouldUseMicrosoftCCforMangling();
47744774
const llvm::Triple &TT = TI.getTriple();
47754775
bool IsX64 = TT.getArch() == llvm::Triple::x86_64;
47764776
bool IsAArch64 = (TT.getArch() == llvm::Triple::aarch64 ||
@@ -4782,19 +4782,19 @@ static bool checkVAStartABI(Sema &S, unsigned BuiltinID, Expr *Fn) {
47824782
CC = FD->getType()->castAs<FunctionType>()->getCallConv();
47834783
if (IsMSVAStart) {
47844784
// Don't allow this in System V ABI functions.
4785-
if (CC == CC_X86_64SysV || (!IsMicrosoftABI && CC != CC_Win64))
4785+
if (CC == CC_X86_64SysV || (!IsMicrosoftCC && CC != CC_Win64))
47864786
return S.Diag(Fn->getBeginLoc(),
47874787
diag::err_ms_va_start_used_in_sysv_function);
47884788
} else {
47894789
// On x86-64/AArch64 Unix, don't allow this in Win64 ABI functions.
47904790
// On x64 Windows, don't allow this in System V ABI functions.
47914791
// (Yes, that means there's no corresponding way to support variadic
47924792
// System V ABI functions on Windows.)
4793-
if ((IsMicrosoftABI && CC == CC_X86_64SysV) ||
4794-
(!IsMicrosoftABI && CC == CC_Win64))
4793+
if ((IsMicrosoftCC && CC == CC_X86_64SysV) ||
4794+
(!IsMicrosoftCC && CC == CC_Win64))
47954795
return S.Diag(Fn->getBeginLoc(),
47964796
diag::err_va_start_used_in_wrong_abi_function)
4797-
<< !IsMicrosoftABI;
4797+
<< !IsMicrosoftCC;
47984798
}
47994799
return false;
48004800
}

0 commit comments

Comments
 (0)