[flang-commits] [flang] [flang] Add GETCWD runtime and lowering intrinsics implementation (PR #92746)
via flang-commits
flang-commits at lists.llvm.org
Mon May 20 06:11:03 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 9940620f6eab50deeaed0d976b2ea0afd007ba24 125efa682b4fe3a678373cac2d95c30568242e51 -- flang/include/flang/Optimizer/Builder/IntrinsicCall.h flang/include/flang/Optimizer/Builder/Runtime/Command.h flang/include/flang/Runtime/command.h flang/include/flang/Runtime/magic-numbers.h flang/lib/Evaluate/intrinsics.cpp flang/lib/Optimizer/Builder/IntrinsicCall.cpp flang/lib/Optimizer/Builder/Runtime/Command.cpp flang/runtime/command.cpp flang/runtime/stat.h
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
index 209fb0994a..ac87c757c7 100644
--- a/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
+++ b/flang/include/flang/Optimizer/Builder/IntrinsicCall.h
@@ -232,7 +232,8 @@ struct IntrinsicLibrary {
mlir::Value genFloor(mlir::Type, llvm::ArrayRef<mlir::Value>);
mlir::Value genFraction(mlir::Type resultType,
mlir::ArrayRef<mlir::Value> args);
- fir::ExtendedValue genGetCwd(std::optional<mlir::Type> resultType, llvm::ArrayRef<fir::ExtendedValue> args);
+ fir::ExtendedValue genGetCwd(std::optional<mlir::Type> resultType,
+ llvm::ArrayRef<fir::ExtendedValue> args);
void genGetCommand(mlir::ArrayRef<fir::ExtendedValue> args);
mlir::Value genGetPID(mlir::Type resultType,
llvm::ArrayRef<mlir::Value> args);
diff --git a/flang/include/flang/Optimizer/Builder/Runtime/Command.h b/flang/include/flang/Optimizer/Builder/Runtime/Command.h
index 24790f7ec5..0d60a367d9 100644
--- a/flang/include/flang/Optimizer/Builder/Runtime/Command.h
+++ b/flang/include/flang/Optimizer/Builder/Runtime/Command.h
@@ -53,11 +53,10 @@ mlir::Value genGetEnvVariable(fir::FirOpBuilder &, mlir::Location,
mlir::Value length, mlir::Value trimName,
mlir::Value errmsg);
-
/// Generate a call to the GetCwd runtime function which implements
/// the GETCWD intrinsic.
-mlir::Value genGetCwd(fir::FirOpBuilder &builder,
- mlir::Location loc, mlir::Value c);
+mlir::Value genGetCwd(fir::FirOpBuilder &builder, mlir::Location loc,
+ mlir::Value c);
} // namespace fir::runtime
#endif // FORTRAN_OPTIMIZER_BUILDER_RUNTIME_COMMAND_H
diff --git a/flang/include/flang/Runtime/command.h b/flang/include/flang/Runtime/command.h
index 996a71af22..7ab3f6442d 100644
--- a/flang/include/flang/Runtime/command.h
+++ b/flang/include/flang/Runtime/command.h
@@ -57,7 +57,8 @@ std::int32_t RTNAME(GetEnvVariable)(const Descriptor &name,
const char *sourceFile = nullptr, int line = 0);
// Calls getcwd()
-std::int32_t RTNAME(GetCwd)(const Descriptor &cwd, const char *sourceFile, int line);
+std::int32_t RTNAME(GetCwd)(
+ const Descriptor &cwd, const char *sourceFile, int line);
}
} // namespace Fortran::runtime
``````````
</details>
https://github.com/llvm/llvm-project/pull/92746
More information about the flang-commits
mailing list