[PATCH] D94820: Support for instrumenting only selected files or functions

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 21 11:03:18 PST 2021


phosek marked an inline comment as done.
phosek added inline comments.


================
Comment at: clang/lib/CodeGen/CodeGenFunction.cpp:851
+        return "csllvm";
+      default:
+        llvm_unreachable("unknown instrumentation type");
----------------
vsk wrote:
> If we add an instrumentation kind, it may be more convenient to trigger a -Wcovered-switch warning (by removing this default case) vs. seeing a crash at runtime.
Done, I've also decided to move the helper function inside the `ProfileList` class to hide the detail of how `ProfileInstrKind` translates to section name.


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

https://reviews.llvm.org/D94820



More information about the cfe-commits mailing list