[llvm-branch-commits] [clang] [flang] [lld] [llvm] [Flang][DRAFT] LLVM_ENABLE_RUNTIMES=FortranRuntime (PR #110217)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Oct 1 06:49:04 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 2216bfe4a07625d894accf5730a313a65d30a982 c7bc5e9785751bba5784b2ec93702b8e5005974d --extensions h,c,cpp -- FortranRuntime/include/flang/Common/ISO_Fortran_binding_wrapper.h FortranRuntime/include/flang/Runtime/io-api.h FortranRuntime/include/flang/Runtime/iostat.h FortranRuntime/lib/Runtime/file.cpp FortranRuntime/lib/Runtime/io-error.cpp FortranRuntime/lib/Runtime/stat.h clang/lib/Driver/ToolChains/CommonArgs.cpp clang/lib/Driver/ToolChains/Flang.cpp flang/lib/Evaluate/fold-logical.cpp lld/COFF/MinGW.cpp FortranRuntime/include/flang/Common/magic-numbers.h FortranRuntime/test/Runtime/no-cpp-dep.c flang/include/flang/ISO_Fortran_binding.h
``````````

</details>

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

``````````diff
diff --git a/FortranRuntime/include/flang/Common/magic-numbers.h b/FortranRuntime/include/flang/Common/magic-numbers.h
index 931df69076..1fadc78fdf 100644
--- a/FortranRuntime/include/flang/Common/magic-numbers.h
+++ b/FortranRuntime/include/flang/Common/magic-numbers.h
@@ -1,4 +1,5 @@
-#if 0 /*===-- include/flang/Runtime/magic-numbers.h ---------------*- C -*-===*/
+#if 0 /*===-- include/flang/Runtime/magic-numbers.h ---------------*- C \
+         -*-===*/
  *
  * Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  * See https://llvm.org/LICENSE.txt for license information.
diff --git a/FortranRuntime/include/flang/Runtime/io-api.h b/FortranRuntime/include/flang/Runtime/io-api.h
index 93971a2282..be948061c2 100644
--- a/FortranRuntime/include/flang/Runtime/io-api.h
+++ b/FortranRuntime/include/flang/Runtime/io-api.h
@@ -11,10 +11,10 @@
 #ifndef FORTRAN_RUNTIME_IO_API_H_
 #define FORTRAN_RUNTIME_IO_API_H_
 
+#include "flang/Common/magic-numbers.h"
 #include "flang/Common/uint128.h"
 #include "flang/Runtime/entry-names.h"
 #include "flang/Runtime/iostat.h"
-#include "flang/Common/magic-numbers.h"
 #include <cinttypes>
 #include <cstddef>
 
diff --git a/FortranRuntime/lib/Runtime/file.cpp b/FortranRuntime/lib/Runtime/file.cpp
index 9988ced2b5..80829d8448 100644
--- a/FortranRuntime/lib/Runtime/file.cpp
+++ b/FortranRuntime/lib/Runtime/file.cpp
@@ -7,9 +7,9 @@
 //===----------------------------------------------------------------------===//
 
 #include "file.h"
+#include "tools.h"
 #include "flang/Common/magic-numbers.h"
 #include "flang/Runtime/memory.h"
-#include "tools.h"
 #include <algorithm>
 #include <cerrno>
 #include <cstring>
diff --git a/FortranRuntime/lib/Runtime/io-error.cpp b/FortranRuntime/lib/Runtime/io-error.cpp
index 30fabe5ba0..400b211c1c 100644
--- a/FortranRuntime/lib/Runtime/io-error.cpp
+++ b/FortranRuntime/lib/Runtime/io-error.cpp
@@ -8,8 +8,8 @@
 
 #include "io-error.h"
 #include "config.h"
-#include "flang/Common/magic-numbers.h"
 #include "tools.h"
+#include "flang/Common/magic-numbers.h"
 #include <cerrno>
 #include <cstdarg>
 #include <cstdio>
diff --git a/FortranRuntime/test/Runtime/no-cpp-dep.c b/FortranRuntime/test/Runtime/no-cpp-dep.c
index f6760b75a1..971e714167 100644
--- a/FortranRuntime/test/Runtime/no-cpp-dep.c
+++ b/FortranRuntime/test/Runtime/no-cpp-dep.c
@@ -12,9 +12,9 @@ RUN: rm a.out
 */
 
 #include "flang/Runtime/entry-names.h"
-#include <stdint.h>
 #include <stdbool.h>
 #include <stddef.h>
+#include <stdint.h>
 
 /*
 Manually add declarations for the runtime functions that we want to make sure
@@ -32,8 +32,8 @@ int32_t RTNAME(ArgumentCount)();
 int32_t RTNAME(GetCommandArgument)(int32_t, const struct Descriptor *,
     const struct Descriptor *, const struct Descriptor *);
 int32_t RTNAME(GetEnvVariable)(const struct Descriptor *,
-    const struct Descriptor *, const struct Descriptor *, bool ,
-    const struct Descriptor *, const char *, int );
+    const struct Descriptor *, const struct Descriptor *, bool,
+    const struct Descriptor *, const char *, int);
 int64_t RTNAME(SystemClockCount)(int kind);
 
 int main() {
diff --git a/flang/lib/Evaluate/fold-logical.cpp b/flang/lib/Evaluate/fold-logical.cpp
index 3c0b85cc34..a7e1aad38f 100644
--- a/flang/lib/Evaluate/fold-logical.cpp
+++ b/flang/lib/Evaluate/fold-logical.cpp
@@ -9,8 +9,8 @@
 #include "fold-implementation.h"
 #include "fold-matmul.h"
 #include "fold-reduction.h"
-#include "flang/Evaluate/check-expression.h"
 #include "flang/Common/magic-numbers.h"
+#include "flang/Evaluate/check-expression.h"
 
 namespace Fortran::evaluate {
 

``````````

</details>


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


More information about the llvm-branch-commits mailing list