clang  6.0.0svn
XRayLists.h
Go to the documentation of this file.
1 //===--- XRayLists.h - XRay automatic attribution ---------------*- 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 // User-provided filters for always/never XRay instrumenting certain functions.
11 //
12 //===----------------------------------------------------------------------===//
13 #ifndef LLVM_CLANG_BASIC_XRAYLISTS_H
14 #define LLVM_CLANG_BASIC_XRAYLISTS_H
15 
16 #include "clang/Basic/LLVM.h"
19 #include "llvm/ADT/ArrayRef.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/Support/SpecialCaseList.h"
22 #include <memory>
23 
24 namespace clang {
25 
27  std::unique_ptr<llvm::SpecialCaseList> AlwaysInstrument;
28  std::unique_ptr<llvm::SpecialCaseList> NeverInstrument;
29  SourceManager &SM;
30 
31 public:
32  XRayFunctionFilter(ArrayRef<std::string> AlwaysInstrumentPaths,
33  ArrayRef<std::string> NeverInstrumentPaths,
34  SourceManager &SM);
35 
36  enum class ImbueAttribute {
37  NONE,
38  ALWAYS,
39  NEVER,
41  };
42 
43  ImbueAttribute shouldImbueFunction(StringRef FunctionName) const;
44 
47  StringRef Category = StringRef()) const;
48 
50  StringRef Category = StringRef()) const;
51 };
52 
53 } // namespace clang
54 
55 #endif
Defines the SourceManager interface.
ImbueAttribute shouldImbueFunctionsInFile(StringRef Filename, StringRef Category=StringRef()) const
Definition: XRayLists.cpp:41
int Category
Definition: Format.cpp:1319
Forward-declares and imports various common LLVM datatypes that clang wants to use unqualified...
XRayFunctionFilter(ArrayRef< std::string > AlwaysInstrumentPaths, ArrayRef< std::string > NeverInstrumentPaths, SourceManager &SM)
Definition: XRayLists.cpp:17
StringRef Filename
Definition: Format.cpp:1316
Encodes a location in the source.
Dataflow Directional Tag Classes.
Defines the clang::SourceLocation class and associated facilities.
ImbueAttribute shouldImbueFunction(StringRef FunctionName) const
Definition: XRayLists.cpp:26
ImbueAttribute shouldImbueLocation(SourceLocation Loc, StringRef Category=StringRef()) const
Definition: XRayLists.cpp:53
This class handles loading and caching of source files into memory.