[PATCH] D85810: [clang] Pass-through remarks options to linker

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Sep 18 21:16:13 PDT 2020


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/CommonArgs.cpp:95
+    if (F.empty())
+      F = llvm::sys::path::stem(Input.getBaseInput());
+  }
----------------
Is the `F.empty()` case unreachable? Please delete the code or add an assert


================
Comment at: clang/test/Driver/opt-record.c:47
+// No pass-through: lto is disabled
+// RUN: %clang -target x86_64 -### -o FOO -fdiagnostics-hotness-threshold=100 -fsave-optimization-record %s 2>&1 | not FileCheck %s -check-prefix=CHECK-PASS
+
----------------
This looks strange. We don't test with `not FileCheck`

You are right that we should specify `x86_64-linux` because otherwise the command line is constructed from gcc (rarely used bare metal linking).

Suggest: use this RUN line to test the case without `-o`


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D85810/new/

https://reviews.llvm.org/D85810



More information about the cfe-commits mailing list