[clang] [Profile] Refactor profile correlation. (PR #69656)

Ellis Hoag via cfe-commits cfe-commits at lists.llvm.org
Mon Oct 23 13:30:37 PDT 2023


================
@@ -24,15 +24,37 @@
 
 using namespace llvm;
 
-/// Get the __llvm_prf_cnts section.
-Expected<object::SectionRef> getCountersSection(const object::ObjectFile &Obj) {
+namespace llvm {
+// Deprecated. Use -profile-correlate=debug-info.
+cl::opt<bool>
+    DebugInfoCorrelate("profile-correlate=debug-info",
----------------
ellishg wrote:

```suggestion
    DebugInfoCorrelate("debug-info-correlate",
```
I think you meant to keep `-debug-info-correlate` unchanged. Also, please add the deprecated comment to the help message.

Maybe after the next LLVM release we can remove this flag. This will allow us and others to easily migrate to the new flag.

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


More information about the cfe-commits mailing list