Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/coreclr/jit/emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8130,8 +8130,8 @@ void emitter::emitInitIG(insGroup* ig)

#ifdef DEBUG
ig->lastGeneratedBlock = nullptr;
// Explicitly call the constructor, since IGs don't actually have a constructor.
ig->igBlocks.jitstd::list<BasicBlock*>::list(emitComp->getAllocator(CMK_LoopOpt));
// Explicitly call init, since IGs don't actually have a constructor.
ig->igBlocks.jitstd::list<BasicBlock*>::init(emitComp->getAllocator(CMK_LoopOpt));
#endif
}

Expand Down
11 changes: 11 additions & 0 deletions src/coreclr/jit/jitstd/list.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,17 @@ class list
Node* m_pNode;
};

#ifdef DEBUG
void init(const Allocator& a)
{
m_pHead = nullptr;
m_pTail = nullptr;
m_nSize = 0;
m_allocator = a;
m_nodeAllocator = a;
}
#endif

explicit list(const Allocator&);
list(size_type n, const T& value, const Allocator&);

Expand Down