clang  15.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_PROFILELIST_H
14 #define LLVM_CLANG_BASIC_PROFILELIST_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 clang {
25 
26 class ProfileSpecialCaseList;
27 
28 class ProfileList {
29  std::unique_ptr<ProfileSpecialCaseList> SCL;
30  const bool Empty;
31  const bool Default;
32  SourceManager &SM;
33 
34 public:
36  ~ProfileList();
37 
38  bool isEmpty() const { return Empty; }
39  bool getDefault() const { return Default; }
40 
42  isFunctionExcluded(StringRef FunctionName,
48  isFileExcluded(StringRef FileName,
50 };
51 
52 } // namespace clang
53 
54 #endif
clang::ProfileList::getDefault
bool getDefault() const
Definition: ProfileList.h:39
clang::SourceLocation
Encodes a location in the source.
Definition: SourceLocation.h:86
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:627
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:38
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:81
clang::ProfileList
Definition: ProfileList.h:28