diff options
author | Kazu Hirata <kazu@google.com> | 2024-05-15 17:53:28 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-15 17:53:28 -0700 |
commit | 26fabdded34f8cea490060a70188a07ad6b76b8b (patch) | |
tree | 950e488b0083b66a2fbaf9eca0bee143f3815a77 /llvm/lib/MC/MCObjectStreamer.cpp | |
parent | c6e787f771d1f9d6a846b2d9b8db6adcd87e8dba (diff) | |
download | llvm-26fabdded34f8cea490060a70188a07ad6b76b8b.zip llvm-26fabdded34f8cea490060a70188a07ad6b76b8b.tar.gz llvm-26fabdded34f8cea490060a70188a07ad6b76b8b.tar.bz2 |
[memprof] Pass FrameIdConverter and CallStackIdConverter by reference (#92327)
CallStackIdConverter sets LastUnmappedId when a mapping failure
occurs. Now, since toMemProfRecord takes an instance of
CallStackIdConverter by value, namely std::function, the caller of
toMemProfRecord never receives the mapping failure that occurs inside
toMemProfRecord. The same problem applies to FrameIdConverter.
The patch fixes the problem by passing FrameIdConverter and
CallStackIdConverter by reference, namely llvm::function_ref.
While I am it, this patch deletes the copy constructor and copy
assignment operator to avoid accidental copies.
Diffstat (limited to 'llvm/lib/MC/MCObjectStreamer.cpp')
0 files changed, 0 insertions, 0 deletions