Skip to content

Commit e232659

Browse files
committed
[NFC][BOLT] Call EnsureAllocatorExists instead of copy pasting code
1 parent abd3149 commit e232659

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

bolt/lib/Core/ParallelUtilities.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,7 @@ void runOnEachFunctionWithUniqueAllocId(
231231
}
232232
}
233233

234-
if (!BC.MIB->checkAllocatorExists(AllocId)) {
235-
MCPlusBuilder::AllocatorIdTy Id =
236-
BC.MIB->initializeNewAnnotationAllocator();
237-
(void)Id;
238-
assert(AllocId == Id && "unexpected allocator id created");
239-
}
234+
EnsureAllocatorExists(AllocId);
240235

241236
Pool.async(runBlock, BlockBegin, BC.getBinaryFunctions().end(), AllocId);
242237
Lock.unlock();

0 commit comments

Comments
 (0)