[llvm] [JITLink][AArch32] Draft fixture class for fixup tests and out-of-range errors in particular (PR #73397)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Nov 25 08:25:04 PST 2023
Stefan =?utf-8?q?Gränitz?= <stefan.graenitz at gmail.com>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/73397 at github.com>
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 fa23d2b9d972134fba3424814b690dd29a33c231 9129999853059b10429199461e7c0357ff6b6e23 -- llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp b/llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp
index 4461d65739..c44329f429 100644
--- a/llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp
+++ b/llvm/unittests/ExecutionEngine/JITLink/AArch32ErrorTests.cpp
@@ -39,8 +39,8 @@ protected:
std::unique_ptr<LinkGraph> G;
Section *S = nullptr;
- const uint8_t Zeros[4] {0x00, 0x00, 0x00, 0x00};
- uint8_t MutableZeros[4] {0x00, 0x00, 0x00, 0x00};
+ const uint8_t Zeros[4]{0x00, 0x00, 0x00, 0x00};
+ uint8_t MutableZeros[4]{0x00, 0x00, 0x00, 0x00};
public:
static void SetUpTestCase() {}
@@ -228,17 +228,19 @@ TEST_F(AArch32Errors_ELF, applyFixupThumbErrors) {
constexpr uint64_t OffsetInTarget = 0;
Symbol &TargetSymbol = G->addAnonymousSymbol(TargetBlock, OffsetInTarget,
- PointerSize, false, false);
+ PointerSize, false, false);
// The second call site has the last in-range distance
constexpr uint64_t OffsetInOriginSecondCall = 4;
Edge InRangeEdge(Thumb_Call, OffsetInOriginSecondCall, TargetSymbol, 0);
- EXPECT_THAT_ERROR(applyFixup(*G, CallSiteBlock, InRangeEdge, ArmCfg), Succeeded());
+ EXPECT_THAT_ERROR(applyFixup(*G, CallSiteBlock, InRangeEdge, ArmCfg),
+ Succeeded());
// The first call site has the first out-of-range distance
constexpr uint64_t OffsetInOriginFirstCall = 0;
Edge OutOfRangeEdge(Thumb_Call, OffsetInOriginFirstCall, TargetSymbol, 0);
EXPECT_THAT_ERROR(applyFixup(*G, CallSiteBlock, OutOfRangeEdge, ArmCfg),
- FailedWithMessage(testing::HasSubstr("out of range of Thumb_Call fixup")));
+ FailedWithMessage(testing::HasSubstr(
+ "out of range of Thumb_Call fixup")));
}
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/73397
More information about the llvm-commits
mailing list