This is a fix for PR #46392 (Diagnostic message (error) related to ThinLTO caching needs to be downgraded to a remark).
There are diagnostic messages related to ThinLTO caching that contain the word "error", but they are really just notices/remarks for users, and they don't cause a build failure. The word "error" appearing can be confusing to users, and may even cause deeper problems.
User's build system might be designed to interpret any error messages (even a benign error message as the one above) reported by the compiler as a build failure, thus causing the build to fail "needlessly". In short, the term "error" in this diagnostic is misleading at best, and may be causing build systems to fail at worst.
We would like to downgrade this "error" message to a diagnostic remark.
There is another error message that needs to be downgraded to a remark, since it’s benign too...
errs() << "error: can't reload cached file '" << CacheEntryPath << "': " << EC.message() << "\n";