Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use init rather than ms extension syntax #55475

Merged
merged 1 commit into from
Jul 12, 2021
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