Skip to content

Commit f7aba99

Browse files
committed
Use new hasAllocType helper
1 parent ed2c505 commit f7aba99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/MemoryProfileInfo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ bool CallStackTrie::buildMIBNodes(CallStackTrieNode *Node, LLVMContext &Ctx,
273273
// reporting hinted sizes, and want to get information from the indexing
274274
// step for all contexts, or have specified a value less than 100% for
275275
// -memprof-cloning-cold-threshold.
276-
if ((AllocationType)Node->AllocTypes == AllocationType::Cold ||
276+
if (Node->hasAllocType(AllocationType::Cold) ||
277277
CalleeDeepestAmbiguousAllocType || MemProfKeepAllNotColdContexts) {
278278
std::vector<ContextTotalSize> ContextSizeInfo;
279279
collectContextSizeInfo(Node, ContextSizeInfo);
@@ -282,7 +282,7 @@ bool CallStackTrie::buildMIBNodes(CallStackTrieNode *Node, LLVMContext &Ctx,
282282
ContextSizeInfo));
283283
// If we just emitted an MIB for a not cold caller, don't need to emit
284284
// another one for the callee to correctly disambiguate its cold callers.
285-
if ((AllocationType)Node->AllocTypes != AllocationType::Cold)
285+
if (!Node->hasAllocType(AllocationType::Cold))
286286
CalleeDeepestAmbiguousAllocType = false;
287287
}
288288
return true;

0 commit comments

Comments
 (0)