Skip to content

Commit e09cc3f

Browse files
author
git apple-llvm automerger
committed
Merge commit 'b84ce9979990' from llvm.org/main into next
2 parents 78caebc + b84ce99 commit e09cc3f

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

clang/lib/CodeGen/Targets/RISCV.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -529,7 +529,10 @@ class RISCVTargetCodeGenInfo : public TargetCodeGenInfo {
529529
RISCVTargetCodeGenInfo(CodeGen::CodeGenTypes &CGT, unsigned XLen,
530530
unsigned FLen, bool EABI)
531531
: TargetCodeGenInfo(
532-
std::make_unique<RISCVABIInfo>(CGT, XLen, FLen, EABI)) {}
532+
std::make_unique<RISCVABIInfo>(CGT, XLen, FLen, EABI)) {
533+
SwiftInfo =
534+
std::make_unique<SwiftABIInfo>(CGT, /*SwiftErrorInRegister=*/false);
535+
}
533536

534537
void setTargetAttributes(const Decl *D, llvm::GlobalValue *GV,
535538
CodeGen::CodeGenModule &CGM) const override {

clang/test/CodeGenCXX/arm-swiftcall.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
// RUN: %clang_cc1 -triple armv7-apple-darwin9 -emit-llvm -o - %s -Wno-return-type-c-linkage -std=c++03 | FileCheck %s -check-prefixes=CHECK
22

3+
// For now just check that the RISC-V triples are accepted, but don't check the IR, as swiftcall is not yet supported.
4+
// RUN: %clang_cc1 -triple riscv32-unknown-linux-gnu -emit-llvm -o - %s -Wno-return-type-c-linkage -std=c++03
5+
// RUN: %clang_cc1 -triple riscv64-unknown-linux-gnu -emit-llvm -o - %s -Wno-return-type-c-linkage -std=c++03
6+
37
// This isn't really testing anything ARM-specific; it's just a convenient
48
// 32-bit platform.
59

0 commit comments

Comments
 (0)