Skip to content

Commit 4ee0677

Browse files
Carl Petokubamracek
Carl Peto
authored andcommitted
[AVR] make the AVR ABI Swift compatible
1 parent 188df9b commit 4ee0677

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

clang/lib/CodeGen/Targets/AVR.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,10 @@ class AVRABIInfo : public DefaultABIInfo {
112112
class AVRTargetCodeGenInfo : public TargetCodeGenInfo {
113113
public:
114114
AVRTargetCodeGenInfo(CodeGenTypes &CGT, unsigned NPR, unsigned NRR)
115-
: TargetCodeGenInfo(std::make_unique<AVRABIInfo>(CGT, NPR, NRR)) {}
115+
: TargetCodeGenInfo(std::make_unique<AVRABIInfo>(CGT, NPR, NRR)) {
116+
SwiftInfo =
117+
std::make_unique<SwiftABIInfo>(CGT, /*SwiftErrorInRegister=*/false);
118+
}
116119

117120
LangAS getGlobalVarAddressSpace(CodeGenModule &CGM,
118121
const VarDecl *D) const override {

0 commit comments

Comments
 (0)