[PATCH] D105907: [CallGraphSection] Add call graph section options and documentation
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Jul 16 13:25:10 PDT 2021
MaskRay added inline comments.
================
Comment at: clang/test/Driver/clang_f_opts.c:603
+// RUN: %clang -### -fno-call-graph-section %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CALL-GRAPH-SECTION %s
+// RUN: %clang -### %s 2>&1 | FileCheck -check-prefix=CHECK-NO-CALL-GRAPH-SECTION %s
+// CHECK-CALL-GRAPH-SECTION: -fcall-graph-section
----------------
morehouse wrote:
> For completeness, we should also test
> ```
> -fcall-graph-section -fno-call-graph-section
> ```
> and
> ```
> -fno-call-graph-section -fcall-graph-section
> ```
I find it usually a bit wasteful to have too many RUN lines for a boolean option.
Testing just `-fcall-graph-section` and `-fcall-graph-section -fno-call-graph-section` will look good enough to me. See `coverage.c` for an example.
I think nowadays the practice is to have boolean options tested in separate files, instead of the monolithic clang_f_opts.c
--
(I saw you CCed me. I have applied the patch series locally. I need to experiment it a bit before commenting.)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105907/new/
https://reviews.llvm.org/D105907
More information about the cfe-commits
mailing list