diff --git a/bolt/lib/Rewrite/RewriteInstance.cpp b/bolt/lib/Rewrite/RewriteInstance.cpp --- a/bolt/lib/Rewrite/RewriteInstance.cpp +++ b/bolt/lib/Rewrite/RewriteInstance.cpp @@ -1428,10 +1428,17 @@ Function.hasRestoredNameRegex(".*\\.cold(\\.[0-9]+)?"); if (FragName) { static bool PrintedWarning = false; - if (BC->HasRelocations && !PrintedWarning) { - errs() << "BOLT-WARNING: split function detected on input : " - << *FragName << ". The support is limited in relocation mode.\n"; + if (!PrintedWarning) { PrintedWarning = true; + errs() << "BOLT-WARNING: split function detected on input : " + << *FragName << ". "; + if (BC->HasRelocations) + errs() << "The support is limited in relocation mode."; + if (opts::Lite) { + opts::Lite = false; + errs() << "\nBOLT-WARNING: disabling lite mode (-lite) when split " + << "functions are present.\n"; + } } Function.IsFragment = true; }