[clang] [Clang][OpenMP] Fix multi arch compilation for -march option (PR #92290)

via cfe-commits cfe-commits at lists.llvm.org
Wed May 15 09:18:31 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 9bbefb7f600019c9d7025281132dd160729bfff2 a6611634d03d102a8b69df8ff20d324efd81ae48 -- clang/lib/Driver/Driver.cpp clang/test/Driver/amdgpu-openmp-toolchain.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 9ba148dd93..4b2cb72c53 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -4486,7 +4486,7 @@ Driver::getOffloadArchs(Compilation &C, const llvm::opt::DerivedArgList &Args,
 
     // Add or remove the seen architectures in order of appearance. If an
     // invalid architecture is given we simply exit.
-    if (Arg->getOption().matches(options::OPT_offload_arch_EQ)||
+    if (Arg->getOption().matches(options::OPT_offload_arch_EQ) ||
         Arg->getOption().matches(options::OPT_march_EQ)) {
       for (StringRef Arch : llvm::split(Arg->getValue(), ",")) {
         if (Arch == "native" || Arch.empty()) {

``````````

</details>


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


More information about the cfe-commits mailing list