Skip to content

Commit

Permalink
Use init rather than ms extension syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
am11 committed Jul 11, 2021
1 parent a31d0d5 commit f8300dd
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
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

0 comments on commit f8300dd

Please sign in to comment.