[llvm] [llvm-exegesis] Switch from intptr_t to uintptr_t in most cases (PR #102860)

via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 12 00:52:54 PDT 2024


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 cb372bd5e789a7d5f1945b476e643d4abfd18f35 d654256e23fb99bafcafbebae52434614d307b04 --extensions h,cpp -- llvm/tools/llvm-exegesis/lib/Assembler.h llvm/tools/llvm-exegesis/lib/BenchmarkResult.h llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp llvm/tools/llvm-exegesis/lib/Error.h llvm/tools/llvm-exegesis/lib/SnippetFile.cpp llvm/tools/llvm-exegesis/lib/SubprocessMemory.cpp llvm/tools/llvm-exegesis/lib/Target.h llvm/tools/llvm-exegesis/lib/X86/Target.cpp llvm/unittests/tools/llvm-exegesis/BenchmarkRunnerTest.cpp llvm/unittests/tools/llvm-exegesis/X86/SnippetFileTest.cpp llvm/unittests/tools/llvm-exegesis/X86/SubprocessMemoryTest.cpp llvm/unittests/tools/llvm-exegesis/X86/TargetTest.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
index d2ed46242c..b60ee41fef 100644
--- a/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
+++ b/llvm/tools/llvm-exegesis/lib/BenchmarkRunner.cpp
@@ -516,7 +516,7 @@ private:
       exit(ChildProcessExitCodeE::AuxiliaryMemorySetupFailed);
 
     ((void (*)(size_t, int))(uintptr_t)FunctionDataCopy)(FunctionDataCopySize,
-                                                        *AuxMemFDOrError);
+                                                         *AuxMemFDOrError);
 
     exit(0);
   }
diff --git a/llvm/tools/llvm-exegesis/lib/Error.h b/llvm/tools/llvm-exegesis/lib/Error.h
index 9f48d007a1..4a3e48997f 100644
--- a/llvm/tools/llvm-exegesis/lib/Error.h
+++ b/llvm/tools/llvm-exegesis/lib/Error.h
@@ -53,7 +53,7 @@ class SnippetSegmentationFault : public SnippetExecutionFailure {
 public:
   static char ID;
   SnippetSegmentationFault(uintptr_t SegFaultAddress)
-      : Address(SegFaultAddress){};
+      : Address(SegFaultAddress) {};
 
   uintptr_t getAddress() { return Address; }
 
diff --git a/llvm/tools/llvm-exegesis/lib/SnippetFile.cpp b/llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
index bb4223fec7..4f16d0ba0c 100644
--- a/llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
+++ b/llvm/tools/llvm-exegesis/lib/SnippetFile.cpp
@@ -152,7 +152,7 @@ public:
     if (CommentText.consume_front("SNIPPET-ADDRESS")) {
       // LLVM-EXEGESIS-SNIPPET-ADDRESS <address>
       if (!to_integer<uintptr_t>(CommentText.trim(), Result->Key.SnippetAddress,
-                                16)) {
+                                 16)) {
         errs() << "invalid comment 'LLVM-EXEGESIS-SNIPPET-ADDRESS "
                << CommentText
                << "', expected <ADDRESS> to contain a valid integer in "

``````````

</details>


https://github.com/llvm/llvm-project/pull/102860


More information about the llvm-commits mailing list