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,cpp,h --
clang/lib/Basic/Targets/X86.cpp clang/lib/CodeGen/TargetBuiltins/X86.cpp
compiler-rt/lib/builtins/cpu_model/x86.c
llvm/include/llvm/TargetParser/X86TargetParser.h
llvm/lib/TargetParser/X86TargetParser.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/clang/lib/CodeGen/TargetBuiltins/X86.cpp
b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
index df63c1ce7..f243856e3 100644
--- a/clang/lib/CodeGen/TargetBuiltins/X86.cpp
+++ b/clang/lib/CodeGen/TargetBuiltins/X86.cpp
@@ -630,12 +630,9 @@ Value *CodeGenFunction::EmitX86CpuIs(StringRef CPUStr) {
// Calculate the index needed to access the correct field based on the
// range. ABI_VALUE matches with compiler-rt/libgcc values.
auto [Index, Value] = StringSwitch<std::pair<unsigned, unsigned>>(CPUStr)
-#define X86_VENDOR(ENUM, STRING, ABI_VALUE)
\
- .Case(STRING, {0u, ABI_VALUE})
-#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE)
\
- .Case(STR, {1u, ABI_VALUE})
-#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE)
\
- .Case(STR, {2u, ABI_VALUE})
+#define X86_VENDOR(ENUM, STRING, ABI_VALUE) .Case(STRING, {0u, ABI_VALUE})
+#define X86_CPU_TYPE(ENUM, STR, ABI_VALUE) .Case(STR, {1u, ABI_VALUE})
+#define X86_CPU_SUBTYPE(ENUM, STR, ABI_VALUE) .Case(STR, {2u, ABI_VALUE})
#include "llvm/TargetParser/X86TargetParser.def"
.Default({0, 0});
assert(Value != 0 && "Invalid CPUStr passed to CpuIs");
diff --git a/llvm/lib/TargetParser/X86TargetParser.cpp
b/llvm/lib/TargetParser/X86TargetParser.cpp
index c3365da6b..dddf1fe86 100644
--- a/llvm/lib/TargetParser/X86TargetParser.cpp
+++ b/llvm/lib/TargetParser/X86TargetParser.cpp
@@ -762,9 +762,10 @@ llvm::X86::getCpuSupportsMask(ArrayRef<StringRef>
FeatureStrs) {
std::array<uint32_t, 4> FeatureMask{};
for (StringRef FeatureStr : FeatureStrs) {
unsigned Feature = StringSwitch<unsigned>(FeatureStr)
- // ABI_VALUE is used to match values in compiler-rt/libgcc
+ // ABI_VALUE is used to match values in compiler-rt/libgcc
#define X86_FEATURE_COMPAT(ENUM, STR, PRIORITY, ABI_VALUE) .Case(STR,
ABI_VALUE)
-#define X86_MICROARCH_LEVEL(ENUM, STR, PRIORITY, ABI_VALUE) .Case(STR,
ABI_VALUE)
+#define X86_MICROARCH_LEVEL(ENUM, STR, PRIORITY, ABI_VALUE)
\
+ .Case(STR, ABI_VALUE)
#include "llvm/TargetParser/X86TargetParser.def"
;
assert(Feature / 32 < FeatureMask.size());
``````````
</details>
https://github.com/llvm/llvm-project/pull/171172
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits