diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp --- a/clang/lib/Frontend/PrecompiledPreamble.cpp +++ b/clang/lib/Frontend/PrecompiledPreamble.cpp @@ -817,10 +817,9 @@ } CommentHandler *PreambleCallbacks::getCommentHandler() { return nullptr; } -static llvm::ManagedStatic BuildPreambleErrCategory; - std::error_code clang::make_error_code(BuildPreambleError Error) { - return std::error_code(static_cast(Error), *BuildPreambleErrCategory); + static BuildPreambleErrorCategory BuildPreambleErrCategory; + return std::error_code(static_cast(Error), BuildPreambleErrCategory); } const char *BuildPreambleErrorCategory::name() const noexcept {