Skip to content

Commit d87b302

Browse files
committed
Add missing include, fix cmake error
1 parent 5aace18 commit d87b302

File tree

2 files changed

+61
-1
lines changed

2 files changed

+61
-1
lines changed

ClangTidyProfiling.h

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//===--- ClangTidyProfiling.h - clang-tidy ----------------------*- C++ -*-===//
2+
//
3+
// The LLVM Compiler Infrastructure
4+
//
5+
// This file is distributed under the University of Illinois Open Source
6+
// License. See LICENSE.TXT for details.
7+
//
8+
//===----------------------------------------------------------------------===//
9+
10+
#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYPROFILING_H
11+
#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYPROFILING_H
12+
13+
#include "llvm/ADT/Optional.h"
14+
#include "llvm/ADT/StringMap.h"
15+
#include "llvm/Support/Chrono.h"
16+
#include "llvm/Support/Timer.h"
17+
#include "llvm/Support/raw_ostream.h"
18+
#include <string>
19+
#include <utility>
20+
#include <vector>
21+
22+
namespace clang {
23+
namespace tidy {
24+
25+
class ClangTidyProfiling {
26+
public:
27+
struct StorageParams {
28+
llvm::sys::TimePoint<> Timestamp;
29+
std::string SourceFilename;
30+
std::string StoreFilename;
31+
32+
StorageParams() = default;
33+
34+
StorageParams(llvm::StringRef ProfilePrefix, llvm::StringRef SourceFile);
35+
};
36+
37+
private:
38+
llvm::Optional<llvm::TimerGroup> TG;
39+
40+
llvm::Optional<StorageParams> Storage;
41+
42+
void printUserFriendlyTable(llvm::raw_ostream &OS);
43+
void printAsJSON(llvm::raw_ostream &OS);
44+
45+
void storeProfileData();
46+
47+
public:
48+
llvm::StringMap<llvm::TimeRecord> Records;
49+
50+
ClangTidyProfiling() = default;
51+
52+
ClangTidyProfiling(llvm::Optional<StorageParams> Storage);
53+
54+
~ClangTidyProfiling();
55+
};
56+
57+
} // end namespace tidy
58+
} // end namespace clang
59+
60+
#endif // LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYPROFILING_H

test/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ find_program(LLVMFILECHECK FileCheck HINTS PATH)
77
if (LLVMFILECHECK)
88

99
# testing namespace naming checker
10-
add_test(NAME aliceo2namespace COMMAND
10+
# add_test(NAME aliceo2namespace COMMAND
1111
# ${CMAKE_SOURCE_DIR}/check_clang_tidy.py
1212
# ${CMAKE_SOURCE_DIR}/test/aliceO2-namespace-naming.cpp
1313
# aliceO2-namespace-naming ${CMAKE_BINARY_DIR}/tool/O2codecheck)

0 commit comments

Comments
 (0)