@@ -6204,6 +6204,18 @@ void Compiler::impMarkInlineCandidate(GenTree* callNode,
6204
6204
CORINFO_CALL_INFO* callInfo,
6205
6205
IL_OFFSET ilOffset)
6206
6206
{
6207
+ if (!opts.OptEnabled (CLFLG_INLINING))
6208
+ {
6209
+ /* XXX Mon 8/18/2008
6210
+ * This assert is misleading. The caller does not ensure that we have CLFLG_INLINING set before
6211
+ * calling impMarkInlineCandidate. However, if this assert trips it means that we're an inlinee and
6212
+ * CLFLG_MINOPT is set. That doesn't make a lot of sense. If you hit this assert, work back and
6213
+ * figure out why we did not set MAXOPT for this compile.
6214
+ */
6215
+ assert (!compIsForInlining ());
6216
+ return ;
6217
+ }
6218
+
6207
6219
GenTreeCall* call = callNode->AsCall ();
6208
6220
6209
6221
// Call might not have an inline candidate info yet (will be set by impMarkInlineCandidateHelper)
@@ -6293,17 +6305,7 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call,
6293
6305
// Let the strategy know there's another call
6294
6306
impInlineRoot ()->m_inlineStrategy ->NoteCall ();
6295
6307
6296
- if (!opts.OptEnabled (CLFLG_INLINING))
6297
- {
6298
- /* XXX Mon 8/18/2008
6299
- * This assert is misleading. The caller does not ensure that we have CLFLG_INLINING set before
6300
- * calling impMarkInlineCandidate. However, if this assert trips it means that we're an inlinee and
6301
- * CLFLG_MINOPT is set. That doesn't make a lot of sense. If you hit this assert, work back and
6302
- * figure out why we did not set MAXOPT for this compile.
6303
- */
6304
- assert (!compIsForInlining ());
6305
- return ;
6306
- }
6308
+ assert (opts.OptEnabled (CLFLG_INLINING));
6307
6309
6308
6310
// Don't inline if not optimizing root method
6309
6311
if (opts.compDbgCode )
0 commit comments