aboutsummaryrefslogtreecommitdiff
path: root/lib/ProfileData
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2015-06-21 13:59:01 +0000
committerDimitry Andric <dim@FreeBSD.org>2015-06-21 13:59:01 +0000
commit3a0822f094b578157263e04114075ad7df81db41 (patch)
treebc48361fe2cd1ca5f93ac01b38b183774468fc79 /lib/ProfileData
parent85d8b2bbe386bcfe669575d05b61482d7be07e5d (diff)
Notes
Diffstat (limited to 'lib/ProfileData')
-rw-r--r--lib/ProfileData/CMakeLists.txt3
-rw-r--r--lib/ProfileData/CoverageMapping.cpp9
-rw-r--r--lib/ProfileData/CoverageMappingReader.cpp2
-rw-r--r--lib/ProfileData/CoverageMappingWriter.cpp2
-rw-r--r--lib/ProfileData/InstrProf.cpp2
-rw-r--r--lib/ProfileData/InstrProfIndexed.h2
-rw-r--r--lib/ProfileData/InstrProfWriter.cpp2
-rw-r--r--lib/ProfileData/SampleProf.cpp2
8 files changed, 14 insertions, 10 deletions
diff --git a/lib/ProfileData/CMakeLists.txt b/lib/ProfileData/CMakeLists.txt
index 282760f0e66b..22cca4b44df5 100644
--- a/lib/ProfileData/CMakeLists.txt
+++ b/lib/ProfileData/CMakeLists.txt
@@ -11,4 +11,7 @@ add_llvm_library(LLVMProfileData
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ProfileData
+
+ DEPENDS
+ intrinsics_gen
)
diff --git a/lib/ProfileData/CoverageMapping.cpp b/lib/ProfileData/CoverageMapping.cpp
index bbac5c26b1eb..b6c2489bd5c6 100644
--- a/lib/ProfileData/CoverageMapping.cpp
+++ b/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;
diff --git a/lib/ProfileData/CoverageMappingReader.cpp b/lib/ProfileData/CoverageMappingReader.cpp
index ec531c3753ec..32de0babcb2f 100644
--- a/lib/ProfileData/CoverageMappingReader.cpp
+++ b/lib/ProfileData/CoverageMappingReader.cpp
@@ -315,7 +315,7 @@ struct SectionData {
return std::error_code();
}
};
-}
+} // namespace
template <typename T, support::endianness Endian>
std::error_code readCoverageMappingData(
diff --git a/lib/ProfileData/CoverageMappingWriter.cpp b/lib/ProfileData/CoverageMappingWriter.cpp
index d90d2f565155..128003c270d7 100644
--- a/lib/ProfileData/CoverageMappingWriter.cpp
+++ b/lib/ProfileData/CoverageMappingWriter.cpp
@@ -74,7 +74,7 @@ public:
return C;
}
};
-}
+} // namespace
/// \brief Encode the counter.
///
diff --git a/lib/ProfileData/InstrProf.cpp b/lib/ProfileData/InstrProf.cpp
index 92822a71402f..805d6d16aace 100644
--- a/lib/ProfileData/InstrProf.cpp
+++ b/lib/ProfileData/InstrProf.cpp
@@ -54,7 +54,7 @@ class InstrProfErrorCategoryType : public std::error_category {
llvm_unreachable("A value of instrprof_error has no message.");
}
};
-}
+} // namespace
static ManagedStatic<InstrProfErrorCategoryType> ErrorCategory;
diff --git a/lib/ProfileData/InstrProfIndexed.h b/lib/ProfileData/InstrProfIndexed.h
index ebca7b22fbfb..afd8cfb74306 100644
--- a/lib/ProfileData/InstrProfIndexed.h
+++ b/lib/ProfileData/InstrProfIndexed.h
@@ -49,7 +49,7 @@ static inline uint64_t ComputeHash(HashT Type, StringRef K) {
const uint64_t Magic = 0x8169666f72706cff; // "\xfflprofi\x81"
const uint64_t Version = 2;
const HashT HashType = HashT::MD5;
-}
+} // namespace IndexedInstrProf
} // end namespace llvm
diff --git a/lib/ProfileData/InstrProfWriter.cpp b/lib/ProfileData/InstrProfWriter.cpp
index 2188543ed61c..efac2926b6cf 100644
--- a/lib/ProfileData/InstrProfWriter.cpp
+++ b/lib/ProfileData/InstrProfWriter.cpp
@@ -69,7 +69,7 @@ public:
}
}
};
-}
+} // namespace
std::error_code
InstrProfWriter::addFunctionCounts(StringRef FunctionName,
diff --git a/lib/ProfileData/SampleProf.cpp b/lib/ProfileData/SampleProf.cpp
index 920c48a24640..e2894c64be01 100644
--- a/lib/ProfileData/SampleProf.cpp
+++ b/lib/ProfileData/SampleProf.cpp
@@ -42,7 +42,7 @@ class SampleProfErrorCategoryType : public std::error_category {
llvm_unreachable("A value of sampleprof_error has no message.");
}
};
-}
+} // namespace
static ManagedStatic<SampleProfErrorCategoryType> ErrorCategory;