[clang] Deprecate order file instrumentation (PR #121514)

via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 2 11:02:58 PST 2025


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 d9111f19d2ea53d8ce105b3d09425394ccf37969 432c55783cbb5d4a9675f1f6018b58ffc4fe636d --extensions cpp,c -- clang/lib/Driver/ToolChains/Clang.cpp clang/test/Driver/clang_f_opts.c
``````````

</details>

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

``````````diff
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 4f1bf64e8c..daf863c78d 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -8012,17 +8012,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
 
   if (const Arg *A =
           Args.getLastArg(options::OPT_forder_file_instrumentation)) {
-     D.Diag(diag::warn_drv_deprecated_arg)
-         << A->getAsString(Args) << /*hasReplacement=*/true
-         << "-mllvm -pgo-temporal-instrumentation";
-     CmdArgs.push_back("-forder-file-instrumentation");
-     // Enable order file instrumentation when ThinLTO is not on. When ThinLTO is
-     // on, we need to pass these flags as linker flags and that will be handled
-     // outside of the compiler.
-     if (!IsUsingLTO) {
-       CmdArgs.push_back("-mllvm");
-       CmdArgs.push_back("-enable-order-file-instrumentation");
-     }
+    D.Diag(diag::warn_drv_deprecated_arg)
+        << A->getAsString(Args) << /*hasReplacement=*/true
+        << "-mllvm -pgo-temporal-instrumentation";
+    CmdArgs.push_back("-forder-file-instrumentation");
+    // Enable order file instrumentation when ThinLTO is not on. When ThinLTO is
+    // on, we need to pass these flags as linker flags and that will be handled
+    // outside of the compiler.
+    if (!IsUsingLTO) {
+      CmdArgs.push_back("-mllvm");
+      CmdArgs.push_back("-enable-order-file-instrumentation");
+    }
   }
 
   if (Arg *A = Args.getLastArg(options::OPT_fforce_enable_int128,

``````````

</details>


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


More information about the cfe-commits mailing list