[llvm] [RISCV] Support .option {no}exact (PR #122483)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 19 13:56:26 PDT 2025
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff bd2d8c0a7ee196cc60ab0d46d6fab416b1697ae1 c70f679f3285a20b929906e78b3ab31e0a6caadb --extensions h,cpp -- llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVAsmBackend.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVELFStreamer.h llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.cpp llvm/lib/Target/RISCV/MCTargetDesc/RISCVTargetStreamer.h llvm/lib/Target/RISCV/RISCVAsmPrinter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
index a7c2f56353..8dd428a1ba 100644
--- a/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
+++ b/llvm/lib/Target/RISCV/AsmParser/RISCVAsmParser.cpp
@@ -3178,8 +3178,7 @@ bool RISCVAsmParser::parseDirectiveOption() {
return true;
getTargetStreamer().emitDirectiveOptionExact();
- setFeatureBits(RISCV::FeatureExactAssembly,
- "exact-asm");
+ setFeatureBits(RISCV::FeatureExactAssembly, "exact-asm");
clearFeatureBits(RISCV::FeatureRelax, "relax");
return false;
}
@@ -3189,8 +3188,7 @@ bool RISCVAsmParser::parseDirectiveOption() {
return true;
getTargetStreamer().emitDirectiveOptionNoExact();
- clearFeatureBits(RISCV::FeatureExactAssembly,
- "exact-asm");
+ clearFeatureBits(RISCV::FeatureExactAssembly, "exact-asm");
setFeatureBits(RISCV::FeatureRelax, "relax");
return false;
}
@@ -3251,9 +3249,10 @@ bool RISCVAsmParser::parseDirectiveOption() {
}
// Unknown option.
- Warning(Parser.getTok().getLoc(), "unknown option, expected 'push', 'pop', "
- "'rvc', 'norvc', 'arch', 'relax', 'norelax', "
- "'exact' or 'noexact'");
+ Warning(Parser.getTok().getLoc(),
+ "unknown option, expected 'push', 'pop', "
+ "'rvc', 'norvc', 'arch', 'relax', 'norelax', "
+ "'exact' or 'noexact'");
Parser.eatToEndOfStatement();
return false;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/122483
More information about the llvm-commits
mailing list