diff options
Diffstat (limited to 'contrib/llvm/lib/ProfileData/CoverageMapping.cpp')
-rw-r--r-- | contrib/llvm/lib/ProfileData/CoverageMapping.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/contrib/llvm/lib/ProfileData/CoverageMapping.cpp b/contrib/llvm/lib/ProfileData/CoverageMapping.cpp index bbac5c2..b6c2489 100644 --- a/contrib/llvm/lib/ProfileData/CoverageMapping.cpp +++ b/contrib/llvm/lib/ProfileData/CoverageMapping.cpp @@ -19,6 +19,7 @@ #include "llvm/ProfileData/CoverageMappingReader.h" #include "llvm/ProfileData/InstrProfReader.h" #include "llvm/Support/Debug.h" +#include "llvm/Support/Errc.h" #include "llvm/Support/ErrorHandling.h" #include "llvm/Support/ManagedStatic.h" #include "llvm/Support/Path.h" @@ -154,11 +155,11 @@ ErrorOr<int64_t> CounterMappingContext::evaluate(const Counter &C) const { return 0; case Counter::CounterValueReference: if (C.getCounterID() >= CounterValues.size()) - return std::make_error_code(std::errc::argument_out_of_domain); + return make_error_code(errc::argument_out_of_domain); return CounterValues[C.getCounterID()]; case Counter::Expression: { if (C.getExpressionID() >= Expressions.size()) - return std::make_error_code(std::errc::argument_out_of_domain); + return make_error_code(errc::argument_out_of_domain); const auto &E = Expressions[C.getExpressionID()]; ErrorOr<int64_t> LHS = evaluate(E.LHS); if (!LHS) @@ -349,7 +350,7 @@ public: return Segments; } }; -} +} // namespace std::vector<StringRef> CoverageMapping::getUniqueSourceFiles() const { std::vector<StringRef> Filenames; @@ -520,7 +521,7 @@ class CoverageMappingErrorCategoryType : public std::error_category { llvm_unreachable("A value of coveragemap_error has no message."); } }; -} +} // namespace static ManagedStatic<CoverageMappingErrorCategoryType> ErrorCategory; |