[llvm] [AArch64][Build Attributes] Improve Parsing and Formatting (PR #126530)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 24 10:01:48 PST 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 3019e49ebfc5d710191712b6d437c56c01e65b87 ce8434c6694d2ad4d56a2019d1000b1665e4c658 --extensions h,cpp -- llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64ELFStreamer.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
index 1f7b4b484b..028d919661 100644
--- a/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
+++ b/llvm/lib/Target/AArch64/MCTargetDesc/AArch64TargetStreamer.cpp
@@ -216,12 +216,12 @@ void AArch64TargetStreamer::emitAttribute(StringRef VendorName, unsigned Tag,
for (MCELFStreamer::AttributeItem &Item : SubSection.Content) {
// Tag already exists
if (Item.Tag == Tag) {
- Item.Type = unsigned(-1) != Value
- ? MCELFStreamer::AttributeItem::NumericAttribute
- : MCELFStreamer::AttributeItem::TextAttribute;
- Item.IntValue = unsigned(-1) != Value ? Value : unsigned(-1);
- Item.StringValue = unsigned(-1) != Value ? "" : String;
- return;
+ Item.Type = unsigned(-1) != Value
+ ? MCELFStreamer::AttributeItem::NumericAttribute
+ : MCELFStreamer::AttributeItem::TextAttribute;
+ Item.IntValue = unsigned(-1) != Value ? Value : unsigned(-1);
+ Item.StringValue = unsigned(-1) != Value ? "" : String;
+ return;
}
}
if (unsigned(-1) != Value)
``````````
</details>
https://github.com/llvm/llvm-project/pull/126530
More information about the llvm-commits
mailing list