summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorAlexandre Ganea <alexandre.ganea@ubisoft.com>2018-08-29 14:28:04 +0000
committerAlexandre Ganea <alexandre.ganea@ubisoft.com>2018-08-29 14:28:04 +0000
commit51c9349ab35f7c2707532b8d88c4a45c56117615 (patch)
tree6f9fe33c34623846b579fdce61f58daa6958ab9f /clang/lib/Frontend
parent51aadb463edc71748390efa2dfd38082d1800f57 (diff)
downloadbcm5719-llvm-51c9349ab35f7c2707532b8d88c4a45c56117615.tar.gz
bcm5719-llvm-51c9349ab35f7c2707532b8d88c4a45c56117615.zip
[Preamble] Fix incorrect usage of std::error_category
Differential Revision: https://reviews.llvm.org/D51380 llvm-svn: 340929
Diffstat (limited to 'clang/lib/Frontend')
-rw-r--r--clang/lib/Frontend/PrecompiledPreamble.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/clang/lib/Frontend/PrecompiledPreamble.cpp b/clang/lib/Frontend/PrecompiledPreamble.cpp
index 239e0dd974a..c6dd89c05cb 100644
--- a/clang/lib/Frontend/PrecompiledPreamble.cpp
+++ b/clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -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 {
OpenPOWER on IntegriCloud