[Preamble] Fix incorrect usage of std::error_category

Differential Revision: https://reviews.llvm.org/D51380

llvm-svn: 340929
This commit is contained in:
Alexandre Ganea 2018-08-29 14:28:04 +00:00
parent 51aadb463e
commit 51c9349ab3
1 changed files with 3 additions and 1 deletions

View File

@ -742,8 +742,10 @@ std::unique_ptr<PPCallbacks> PreambleCallbacks::createPPCallbacks() {
return nullptr;
}
static llvm::ManagedStatic<BuildPreambleErrorCategory> BuildPreambleErrCategory;
std::error_code clang::make_error_code(BuildPreambleError Error) {
return std::error_code(static_cast<int>(Error), BuildPreambleErrorCategory());
return std::error_code(static_cast<int>(Error), *BuildPreambleErrCategory);
}
const char *BuildPreambleErrorCategory::name() const noexcept {