[llvm] [NFC][RISCV] use OS.indent() to replace spaces (PR #102429)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 8 00:31:30 PDT 2024
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 3c9e3457d7e3153f449bef047d4deb297126f446 da69f8ec388a6234336cca434be78e5e5d50f51f --extensions cpp -- llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
index 34f2a85c80..ae5ce32d61 100644
--- a/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
+++ b/llvm/utils/TableGen/RISCVTargetDefEmitter.cpp
@@ -37,8 +37,8 @@ static void printExtensionTable(raw_ostream &OS,
continue;
OS.indent(4) << "{\"" << getExtensionName(R) << "\", {"
- << R->getValueAsInt("MajorVersion") << ", "
- << R->getValueAsInt("MinorVersion") << "}},\n";
+ << R->getValueAsInt("MajorVersion") << ", "
+ << R->getValueAsInt("MinorVersion") << "}},\n";
}
OS << "};\n\n";
@@ -77,8 +77,8 @@ static void emitRISCVExtensions(RecordKeeper &Records, raw_ostream &OS) {
if (!ImpliedExt->isSubClassOf("RISCVExtension"))
continue;
- OS.indent(4) << "{ {\"" << Name << "\"}, \"" << getExtensionName(ImpliedExt)
- << "\"},\n";
+ OS.indent(4) << "{ {\"" << Name << "\"}, \""
+ << getExtensionName(ImpliedExt) << "\"},\n";
}
}
@@ -237,9 +237,9 @@ static void emitRISCVExtensionBitmask(RecordKeeper &RK, raw_ostream &OS) {
#endif
OS.indent(4) << "{"
- << "\"" << ExtName << "\""
- << ", " << GroupIDVal << ", " << BitPosVal << "ULL"
- << "},\n";
+ << "\"" << ExtName << "\""
+ << ", " << GroupIDVal << ", " << BitPosVal << "ULL"
+ << "},\n";
}
OS << "};\n";
OS << "#endif\n";
``````````
</details>
https://github.com/llvm/llvm-project/pull/102429
More information about the llvm-commits
mailing list