[llvm] [memprof] Add an assert to InstrProfWriter::addMemProfData (PR #117426)

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 24 20:51:35 PST 2024


================
@@ -351,9 +351,14 @@ bool InstrProfWriter::addMemProfCallStack(
 
 bool InstrProfWriter::addMemProfData(memprof::IndexedMemProfData Incoming,
                                      function_ref<void(Error)> Warn) {
-  // TODO: Once we remove support for MemProf format Version V1, assert that
-  // the three components (frames, call stacks, and records) are either all
-  // empty or populated.
+  // Return immediately if everything is empty.
----------------
teresajohnson wrote:

Do we ever try to add an empty memprof profile in practice?

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


More information about the llvm-commits mailing list