[all-commits] [llvm/llvm-project] 2dcec1: [ProfileData] Remove clear() from SampleProfileFun...

Kazu Hirata via All-commits all-commits at lists.llvm.org
Mon Jul 13 16:16:02 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2dcec161f68761495cbd24f50cb0f9277600a5ac
      https://github.com/llvm/llvm-project/commit/2dcec161f68761495cbd24f50cb0f9277600a5ac
  Author: Kazu Hirata <kazu at google.com>
  Date:   2026-07-13 (Mon, 13 Jul 2026)

  Changed paths:
    M llvm/include/llvm/ProfileData/SampleProfReader.h
    M llvm/unittests/ProfileData/SampleProfTest.cpp

  Log Message:
  -----------
  [ProfileData] Remove clear() from SampleProfileFuncOffsetTable (NFC) (#209301)

This patch deletes the default constructor of
SampleProfileFuncOffsetTable and removes its clear() method.

SampleProfileFuncOffsetTable is designed to lock its operational mode
(in-memory or on-disk) strictly at construction time and remain valid
throughout its lifetime. By deleting the default constructor and
removing clear(), we ensure that an instance never enters an
uninitialized or cleared state while kept alive.

When SampleProfileReader needs to discard or reload the table, it
resets and replaces the wrapping std::optional directly instead of
clearing the table in-place.

Assisted-by: Antigravity



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list