nhaehnle created this revision.
nhaehnle added reviewers: efriedma, lattner.
Herald added a project: All.
nhaehnle requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D130578
Files:
clang/lib/Frontend/PrecompiledPreamble.cpp
Index: clang/lib/Frontend/PrecompiledPreamble.cpp
===================================================================
--- clang/lib/Frontend/PrecompiledPreamble.cpp
+++ clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -817,10 +817,9 @@
}
CommentHandler *PreambleCallbacks::getCommentHandler() { return nullptr; }
-static llvm::ManagedStatic<BuildPreambleErrorCategory>
BuildPreambleErrCategory;
-
std::error_code clang::make_error_code(BuildPreambleError Error) {
- return std::error_code(static_cast<int>(Error), *BuildPreambleErrCategory);
+ static BuildPreambleErrorCategory BuildPreambleErrCategory;
+ return std::error_code(static_cast<int>(Error), BuildPreambleErrCategory);
}
const char *BuildPreambleErrorCategory::name() const noexcept {
Index: clang/lib/Frontend/PrecompiledPreamble.cpp
===================================================================
--- clang/lib/Frontend/PrecompiledPreamble.cpp
+++ clang/lib/Frontend/PrecompiledPreamble.cpp
@@ -817,10 +817,9 @@
}
CommentHandler *PreambleCallbacks::getCommentHandler() { return nullptr; }
-static llvm::ManagedStatic<BuildPreambleErrorCategory> BuildPreambleErrCategory;
-
std::error_code clang::make_error_code(BuildPreambleError Error) {
- return std::error_code(static_cast<int>(Error), *BuildPreambleErrCategory);
+ static BuildPreambleErrorCategory BuildPreambleErrCategory;
+ return std::error_code(static_cast<int>(Error), BuildPreambleErrCategory);
}
const char *BuildPreambleErrorCategory::name() const noexcept {
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits