clang  14.0.0git
ProfileList.h
Go to the documentation of this file.
1 //===--- ProfileList.h - ProfileList filter ---------------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // User-provided filters include/exclude profile instrumentation in certain
10 // functions.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_BASIC_INSTRPROFLIST_H
14 #define LLVM_CLANG_BASIC_INSTRPROFLIST_H
15 
17 #include "clang/Basic/LLVM.h"
19 #include "llvm/ADT/ArrayRef.h"
20 #include "llvm/ADT/Optional.h"
21 #include "llvm/ADT/StringRef.h"
22 #include <memory>
23 
24 namespace llvm {
25 class SpecialCaseList;
26 }
27 
28 namespace clang {
29 
30 class ProfileSpecialCaseList;
31 
32 class ProfileList {
33  std::unique_ptr<ProfileSpecialCaseList> SCL;
34  const bool Empty;
35  const bool Default;
36  SourceManager &SM;
37 
38 public:
40  ~ProfileList();
41 
42  bool isEmpty() const { return Empty; }
43  bool getDefault() const { return Default; }
44 
46  isFunctionExcluded(StringRef FunctionName,
52  isFileExcluded(StringRef FileName,
54 };
55 
56 } // namespace clang
57 
58 #endif
clang::ProfileList::getDefault
bool getDefault() const
Definition: ProfileList.h:43
llvm
Definition: Dominators.h:30
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:88
clang::ProfileList::isLocationExcluded
llvm::Optional< bool > isLocationExcluded(SourceLocation Loc, CodeGenOptions::ProfileInstrKind Kind) const
Definition: ProfileList.cpp:100
llvm::Optional< bool >
clang::CodeGenOptions::ProfileInstrKind
ProfileInstrKind
Definition: CodeGenOptions.h:85
clang::SourceManager
This class handles loading and caching of source files into memory.
Definition: SourceManager.h:626
CodeGenOptions.h
clang::StructuralEquivalenceKind::Default
@ Default
clang::ProfileList::isFileExcluded
llvm::Optional< bool > isFileExcluded(StringRef FileName, CodeGenOptions::ProfileInstrKind Kind) const
Definition: ProfileList.cpp:106
clang::ProfileList::isFunctionExcluded
llvm::Optional< bool > isFunctionExcluded(StringRef FunctionName, CodeGenOptions::ProfileInstrKind Kind) const
Definition: ProfileList.cpp:89
clang::ProfileList::isEmpty
bool isEmpty() const
Definition: ProfileList.h:42
clang::ProfileList::~ProfileList
~ProfileList()
SourceLocation.h
llvm::ArrayRef< std::string >
LLVM.h
clang::ProfileList::ProfileList
ProfileList(ArrayRef< std::string > Paths, SourceManager &SM)
Definition: ProfileList.cpp:66
clang::ObjCPropertyAttribute::Kind
Kind
Definition: DeclObjCCommon.h:22
clang
Definition: CalledOnceCheck.h:17
SM
#define SM(sm)
Definition: Cuda.cpp:78
clang::ProfileList
Definition: ProfileList.h:32