Skip to content

Commit f8300dd

Browse files
committed
Use init rather than ms extension syntax
1 parent a31d0d5 commit f8300dd

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

src/coreclr/jit/emit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8130,8 +8130,8 @@ void emitter::emitInitIG(insGroup* ig)
81308130

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

src/coreclr/jit/jitstd/list.h

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,17 @@ class list
160160
Node* m_pNode;
161161
};
162162

163+
#ifdef DEBUG
164+
void init(const Allocator& a)
165+
{
166+
m_pHead = nullptr;
167+
m_pTail = nullptr;
168+
m_nSize = 0;
169+
m_allocator = a;
170+
m_nodeAllocator = a;
171+
}
172+
#endif
173+
163174
explicit list(const Allocator&);
164175
list(size_type n, const T& value, const Allocator&);
165176

0 commit comments

Comments
 (0)