forked from OSchip/llvm-project
[Support] Drop unnecessary const from a return type (NFC)
Identified with readability-const-return-type.
This commit is contained in:
parent
8b9b45ce54
commit
9144e49334
|
@ -200,7 +200,7 @@ void PrintStatisticsJSON(raw_ostream &OS);
|
|||
/// during it's execution. It will return the value at the point that it is
|
||||
/// read. However, it will prevent new statistics from registering until it
|
||||
/// completes.
|
||||
const std::vector<std::pair<StringRef, uint64_t>> GetStatistics();
|
||||
std::vector<std::pair<StringRef, uint64_t>> GetStatistics();
|
||||
|
||||
/// Reset the statistics. This can be used to zero and de-register the
|
||||
/// statistics in order to measure a compilation.
|
||||
|
|
|
@ -253,7 +253,7 @@ void llvm::PrintStatistics() {
|
|||
#endif
|
||||
}
|
||||
|
||||
const std::vector<std::pair<StringRef, uint64_t>> llvm::GetStatistics() {
|
||||
std::vector<std::pair<StringRef, uint64_t>> llvm::GetStatistics() {
|
||||
sys::SmartScopedLock<true> Reader(*StatLock);
|
||||
std::vector<std::pair<StringRef, uint64_t>> ReturnStats;
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ TEST(StatisticTest, API) {
|
|||
// It should empty the list and zero the counters.
|
||||
ResetStatistics();
|
||||
{
|
||||
auto &Range = GetStatistics();
|
||||
auto Range = GetStatistics();
|
||||
EXPECT_EQ(Range.begin(), Range.end());
|
||||
EXPECT_EQ(Counter, 0u);
|
||||
EXPECT_EQ(Counter2, 0u);
|
||||
|
@ -144,7 +144,7 @@ TEST(StatisticTest, API) {
|
|||
Counter2++;
|
||||
|
||||
{
|
||||
auto &Range = GetStatistics();
|
||||
auto Range = GetStatistics();
|
||||
EXPECT_EQ(Range.begin() + 2, Range.end());
|
||||
EXPECT_EQ(Counter, 1u);
|
||||
EXPECT_EQ(Counter2, 1u);
|
||||
|
|
Loading…
Reference in New Issue