aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorLeonard Grey <lgrey@chromium.org>2022-01-12 09:12:53 -0500
committerNico Weber <thakis@chromium.org>2022-01-12 09:22:26 -0500
commit0f853930042f11f5ee489bd56b48a227d057c37e (patch)
tree8c57e4e20fe58a233d37c3186beb3ead4aa899bf /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent732ad8ea62edc403727af57537b5d83dcfa937aa (diff)
downloadllvm-0f853930042f11f5ee489bd56b48a227d057c37e.zip
llvm-0f853930042f11f5ee489bd56b48a227d057c37e.tar.gz
llvm-0f853930042f11f5ee489bd56b48a227d057c37e.tar.bz2
[MachO] Port call graph profile section and directive
This ports the `.cg_profile` assembly directive and call graph profile section generation to MachO from COFF/ELF. Due to MachO section naming rules, the section is called `__LLVM,__cg_profile` rather than `.llvm.call-graph-profile` as in COFF/ELF. Support for llvm-readobj is included to facilitate testing. Corresponding LLD change is D112164 Differential Revision: https://reviews.llvm.org/D112160
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
-rw-r--r--llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
index 20ef01e..ce35003 100644
--- a/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
+++ b/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
@@ -1188,6 +1188,7 @@ void TargetLoweringObjectFileMachO::emitModuleMetadata(MCStreamer &Streamer,
StringRef SectionVal;
GetObjCImageInfo(M, VersionVal, ImageInfoFlags, SectionVal);
+ emitCGProfileMetadata(Streamer, M);
// The section is mandatory. If we don't have it, then we don't have GC info.
if (SectionVal.empty())