@@ -6204,6 +6204,18 @@ void Compiler::impMarkInlineCandidate(GenTree* callNode,
62046204 CORINFO_CALL_INFO* callInfo,
62056205 IL_OFFSET ilOffset)
62066206{
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+
62076219 GenTreeCall* call = callNode->AsCall ();
62086220
62096221 // Call might not have an inline candidate info yet (will be set by impMarkInlineCandidateHelper)
@@ -6293,17 +6305,7 @@ void Compiler::impMarkInlineCandidateHelper(GenTreeCall* call,
62936305 // Let the strategy know there's another call
62946306 impInlineRoot ()->m_inlineStrategy ->NoteCall ();
62956307
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));
63076309
63086310 // Don't inline if not optimizing root method
63096311 if (opts.compDbgCode )
0 commit comments