[lld] [lld][RISCV] Add break to nested switch in `mergeAtomic` (PR #99762)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Jul 20 07:19:36 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-lld-elf
Author: Brandon Wu (4vtomat)
<details>
<summary>Changes</summary>
This prevent the warnings from compiler.
---
Full diff: https://github.com/llvm/llvm-project/pull/99762.diff
1 Files Affected:
- (modified) lld/ELF/Arch/RISCV.cpp (+3)
``````````diff
diff --git a/lld/ELF/Arch/RISCV.cpp b/lld/ELF/Arch/RISCV.cpp
index 6af89ce3517b7..56759c28dcf41 100644
--- a/lld/ELF/Arch/RISCV.cpp
+++ b/lld/ELF/Arch/RISCV.cpp
@@ -1131,6 +1131,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
case RISCVAttrs::RISCVAtomicAbiTag::A6C:
return;
};
+ break;
case RISCVAtomicAbiTag::A6S:
switch (newTag) {
@@ -1144,6 +1145,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
case RISCVAttrs::RISCVAtomicAbiTag::A6S:
return;
};
+ break;
case RISCVAtomicAbiTag::A7:
switch (newTag) {
@@ -1157,6 +1159,7 @@ static void mergeAtomic(DenseMap<unsigned, unsigned>::iterator it,
case RISCVAttrs::RISCVAtomicAbiTag::A7:
return;
};
+ break;
};
// If we get here, then we have an invalid tag, so report it.
``````````
</details>
https://github.com/llvm/llvm-project/pull/99762
More information about the llvm-commits
mailing list