[lld] [llvm] [readobj][ELF][AArch64] Handle misformed AArch64 build attribute section (PR #134886)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 8 10:26:38 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 HEAD~1 HEAD --extensions h,cpp -- lld/ELF/InputFiles.cpp lld/ELF/InputFiles.h llvm/include/llvm/Support/ELFAttributes.h llvm/lib/Support/ELFAttrParserExtended.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Support/ELFAttrParserExtended.cpp b/llvm/lib/Support/ELFAttrParserExtended.cpp
index d2729991e..001006b78 100644
--- a/llvm/lib/Support/ELFAttrParserExtended.cpp
+++ b/llvm/lib/Support/ELFAttrParserExtended.cpp
@@ -131,16 +131,18 @@ Error ELFExtendedAttrParser::parse(ArrayRef<uint8_t> Section,
return Cursor.takeError();
if (!(0 == IsOptional || 1 == IsOptional))
return createStringError(
- errc::invalid_argument,
- "\ninvalid Optionality at offset " + utohexstr(Cursor.tell() - 4) + ": " + utohexstr(IsOptional) + " (Options are 1|0)");
+ errc::invalid_argument,
+ "\ninvalid Optionality at offset " + utohexstr(Cursor.tell() - 4) +
+ ": " + utohexstr(IsOptional) + " (Options are 1|0)");
StringRef IsOptionalStr = IsOptional ? "optional" : "required";
uint8_t Type = De.getU8(Cursor);
if (!Cursor)
return Cursor.takeError();
if (!(0 == Type || 1 == Type))
- return createStringError(
- errc::invalid_argument,
- "\ninvalid Type at offset " + utohexstr(Cursor.tell() - 4) + ": " + utohexstr(Type) + " (Options are 1|0)");
+ return createStringError(errc::invalid_argument,
+ "\ninvalid Type at offset " +
+ utohexstr(Cursor.tell() - 4) + ": " +
+ utohexstr(Type) + " (Options are 1|0)");
StringRef TypeStr = Type ? "ntbs" : "uleb128";
BuildAttributeSubSection BASubSection;
``````````
</details>
https://github.com/llvm/llvm-project/pull/134886
More information about the llvm-commits
mailing list