[clang] [llvm] [Sparc] Add a SPARC TargetParser generated from Sparc.td (PR #245165)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 23 01:19:41 PST 2026
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 origin/main HEAD --extensions c,h,cpp -- llvm/include/llvm/TargetParser/SparcTargetParser.h llvm/lib/TargetParser/SparcTargetParser.cpp llvm/unittests/TargetParser/SparcTargetParserTest.cpp clang/lib/Basic/Targets/Sparc.cpp clang/lib/Basic/Targets/Sparc.h clang/test/Misc/target-invalid-cpu-note/sparc.c clang/test/Preprocessor/predefined-arch-macros.c llvm/lib/Target/Sparc/MCTargetDesc/SparcMCTargetDesc.cpp llvm/lib/Target/Sparc/SparcSubtarget.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/Sparc/SparcSubtarget.cpp b/llvm/lib/Target/Sparc/SparcSubtarget.cpp
index 1d06f965e..d9954bed3 100644
--- a/llvm/lib/Target/Sparc/SparcSubtarget.cpp
+++ b/llvm/lib/Target/Sparc/SparcSubtarget.cpp
@@ -36,7 +36,8 @@ SparcSubtarget &SparcSubtarget::initializeSubtargetDependencies(
StringRef CPU, StringRef TuneCPU, StringRef FS) {
const Triple &TT = getTargetTriple();
// Determine default and user specified characteristics
- std::string CPUName = std::string(Sparc::getNormalizedSparcTargetCPU(TT, CPU));
+ std::string CPUName =
+ std::string(Sparc::getNormalizedSparcTargetCPU(TT, CPU));
if (TuneCPU.empty())
TuneCPU = CPUName;
``````````
</details>
https://github.com/llvm/llvm-project/pull/245165
More information about the cfe-commits
mailing list