Skip to content

Commit 205ff4b

Browse files
committed
[clang][CodeGen][AVR] Fix a crash in AVRABIInfo
fixes #131967
1 parent 163c73d commit 205ff4b

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

clang/lib/CodeGen/Targets/AVR.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -135,8 +135,7 @@ class AVRTargetCodeGenInfo : public TargetCodeGenInfo {
135135
if (GV->isDeclaration())
136136
return;
137137
const auto *FD = dyn_cast_or_null<FunctionDecl>(D);
138-
if (!FD)
139-
return;
138+
if (!FD) return;
140139
auto *Fn = cast<llvm::Function>(GV);
141140

142141
if (FD->getAttr<AVRInterruptAttr>())

clang/test/CodeGen/avr/argument.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ struct s8_t {
119119
char a;
120120
};
121121

122-
// AVR-NOT: {{.*}} signext
123-
// TINY-NOT: {{.*}} signext
122+
// AVR: define {{.*}} i8 @foob(i8 {{.*}})
123+
// TINY define {{.*}} i8 @foob(i8 {{.*}})
124124
char foob(struct s8_t a) {
125125
return a.a + 1;
126126
}

0 commit comments

Comments
 (0)