[llvm] [memprof] Use a new constructor of IndexedAllocationInfo (NFC) (PR #116920)

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 21:50:53 PST 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-transforms

Author: Kazu Hirata (kazutakahirata)

<details>
<summary>Changes</summary>

IndexedAllocationInfo now has a new constructor that allows us to omit
the inline call stack, which is going away soon.  This patch migrates
away from the old constructor.


---
Full diff: https://github.com/llvm/llvm-project/pull/116920.diff


1 Files Affected:

- (modified) llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp (+1-1) 


``````````diff
diff --git a/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp b/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp
index ec81d2e5609163..f0d978674f3242 100644
--- a/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp
+++ b/llvm/unittests/Transforms/Instrumentation/MemProfUseTest.cpp
@@ -323,7 +323,7 @@ makeRecordV2(std::initializer_list<::llvm::memprof::CallStackId> AllocFrames,
   for (const auto &CSId : AllocFrames) {
     // We don't populate IndexedAllocationInfo::CallStack because we use it only
     // in Version1.
-    MR.AllocSites.push_back({{}, CSId, Block, Schema});
+    MR.AllocSites.emplace_back(CSId, Block, Schema);
   }
   for (const auto &CSId : CallSiteFrames)
     MR.CallSiteIds.push_back(CSId);

``````````

</details>


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


More information about the llvm-commits mailing list