Bug 1494384 - fix aarch64 __va_start checking in clang; r=dmajor

We need this so we can get a libclang to use for AArch64 bindgen.
This commit is contained in:
Nathan Froyd 2018-09-27 10:50:28 -04:00
parent cf67c848e4
commit 18aa3c08fc
4 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,16 @@
AArch64 Windows uses a five-argument __va_start, just like ARM.
https://bugs.llvm.org/show_bug.cgi?id=39090
diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp
index 22483f8..53d9cb2 100644
--- a/clang/lib/Sema/SemaChecking.cpp
+++ b/clang/lib/Sema/SemaChecking.cpp
@@ -917,6 +917,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID,
switch (Context.getTargetInfo().getTriple().getArch()) {
case llvm::Triple::arm:
case llvm::Triple::thumb:
+ case llvm::Triple::aarch64:
if (SemaBuiltinVAStartARMMicrosoft(TheCall))
return ExprError();
break;

View File

@ -16,6 +16,7 @@
"r318309.patch",
"r320462.patch",
"msvc-host-x64.patch",
"aarch64-vastart-checking.patch",
"loosen-msvc-detection.patch"
]
}

View File

@ -18,6 +18,7 @@
"r320462.patch",
"r327876.patch",
"loosen-msvc-detection.patch",
"aarch64-vastart-checking.patch",
"fflush-before-unlocking.patch"
]
}

View File

@ -18,6 +18,7 @@
"r342649-hotpatch-8-byte-nops.patch",
"r342652-unpoison-thread-stacks.patch",
"r343123-pin-asan-dll.patch",
"aarch64-vastart-checking.patch",
"loosen-msvc-detection.patch"
]
}