Skip to content

Commit 044f89c

Browse files
4vtomatyuxuanchen1997
authored andcommitted
[lld][RISCV] Add break to nested switch in mergeAtomic (#99762)
Summary: This prevent the warnings from compiler. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251271
1 parent 79eaad5 commit 044f89c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lld/ELF/Arch/RISCV.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1131,6 +1131,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
11311131
case RISCVAttrs::RISCVAtomicAbiTag::A6C:
11321132
return;
11331133
};
1134+
break;
11341135

11351136
case RISCVAtomicAbiTag::A6S:
11361137
switch (newTag) {
@@ -1144,6 +1145,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
11441145
case RISCVAttrs::RISCVAtomicAbiTag::A6S:
11451146
return;
11461147
};
1148+
break;
11471149

11481150
case RISCVAtomicAbiTag::A7:
11491151
switch (newTag) {
@@ -1157,6 +1159,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
11571159
case RISCVAttrs::RISCVAtomicAbiTag::A7:
11581160
return;
11591161
};
1162+
break;
11601163
};
11611164

11621165
// If we get here, then we have an invalid tag, so report it.

0 commit comments

Comments
 (0)