File tree Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Expand file tree Collapse file tree 1 file changed +2
-13
lines changed Original file line number Diff line number Diff line change @@ -152,18 +152,6 @@ void jitShutdown(bool processIsTerminating)
152
152
153
153
/* ****************************************************************************/
154
154
155
- struct CILJitSingletonAllocator
156
- {
157
- int x;
158
- };
159
- const CILJitSingletonAllocator CILJitSingleton = {0 };
160
-
161
- void * __cdecl operator new (size_t , const CILJitSingletonAllocator&)
162
- {
163
- static char CILJitBuff[sizeof (CILJit)];
164
- return CILJitBuff;
165
- }
166
-
167
155
DLLEXPORT ICorJitCompiler* getJit ()
168
156
{
169
157
if (!g_jitInitialized)
@@ -173,7 +161,8 @@ DLLEXPORT ICorJitCompiler* getJit()
173
161
174
162
if (ILJitter == nullptr )
175
163
{
176
- ILJitter = new (CILJitSingleton) CILJit ();
164
+ alignas (alignof (CILJit)) static char CILJitBuff[sizeof (CILJit)];
165
+ ILJitter = new (CILJitBuff, jitstd::placement_t ()) CILJit ();
177
166
}
178
167
return (ILJitter);
179
168
}
You can’t perform that action at this time.
0 commit comments