diff options
author | Adeel Mujahid <3840695+am11@users.noreply.github.com> | 2021-07-12 04:07:13 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-07-12 04:07:13 +0300 |
commit | a4590197c1011384ba8a8469926ade0e72fa9e97 (patch) | |
tree | 3dc65d719b36c01e30f4624e801f5b5588f4e127 /src/coreclr | |
parent | c721c87704434363ee2310ab04b97407c0a12eac (diff) |
Use init rather than ms extension syntax (#55475)
Diffstat (limited to 'src/coreclr')
-rw-r--r-- | src/coreclr/jit/emit.cpp | 4 | ||||
-rw-r--r-- | src/coreclr/jit/jitstd/list.h | 11 |
2 files changed, 13 insertions, 2 deletions
diff --git a/src/coreclr/jit/emit.cpp b/src/coreclr/jit/emit.cpp index ca6cd0c4a71..21e37879eed 100644 --- a/src/coreclr/jit/emit.cpp +++ b/src/coreclr/jit/emit.cpp @@ -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 } diff --git a/src/coreclr/jit/jitstd/list.h b/src/coreclr/jit/jitstd/list.h index 070d94361f2..b573a3952fb 100644 --- a/src/coreclr/jit/jitstd/list.h +++ b/src/coreclr/jit/jitstd/list.h @@ -160,6 +160,17 @@ public: 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&); |