diff options
author | David Sherwood <david.sherwood@arm.com> | 2020-10-27 13:59:29 +0000 |
---|---|---|
committer | David Sherwood <david.sherwood@arm.com> | 2020-10-30 13:35:47 +0000 |
commit | cea69fa4dcc4fcf3be62dba49ad012879d89377d (patch) | |
tree | 8417823808ed5f116fadb9dfef36625b533b6667 /clang/lib/CodeGen/TargetInfo.cpp | |
parent | d14db8c8dc980196c8847d109bd2e585c2ffeb73 (diff) | |
download | llvm-cea69fa4dcc4fcf3be62dba49ad012879d89377d.zip llvm-cea69fa4dcc4fcf3be62dba49ad012879d89377d.tar.gz llvm-cea69fa4dcc4fcf3be62dba49ad012879d89377d.tar.bz2 |
[SVE] Add fatal error for unnamed SVE variadic arguments
We don't currently support passing unnamed variadic SVE arguments
so I've added a fatal error if we hit such cases to prevent any
silent ABI issues in future.
Differential Revision: https://reviews.llvm.org/D90230
Diffstat (limited to 'clang/lib/CodeGen/TargetInfo.cpp')
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index e211a02..63502cc 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -5480,6 +5480,11 @@ private: Address EmitVAArg(CodeGenFunction &CGF, Address VAListAddr, QualType Ty) const override { + llvm::Type *BaseTy = CGF.ConvertType(Ty); + if (isa<llvm::ScalableVectorType>(BaseTy)) + llvm::report_fatal_error("Passing SVE types to variadic functions is " + "currently not supported"); + return Kind == Win64 ? EmitMSVAArg(CGF, VAListAddr, Ty) : isDarwinPCS() ? EmitDarwinVAArg(VAListAddr, Ty, CGF) : EmitAAPCSVAArg(VAListAddr, Ty, CGF); |