16#include "llvm/Support/SpecialCaseList.h"
24 : AlwaysInstrument(
llvm::SpecialCaseList::createOrDie(
25 AlwaysInstrumentPaths,
SM.getFileManager().getVirtualFileSystem())),
26 NeverInstrument(
llvm::SpecialCaseList::createOrDie(
27 NeverInstrumentPaths,
SM.getFileManager().getVirtualFileSystem())),
28 AttrList(
llvm::SpecialCaseList::createOrDie(
29 AttrListPaths,
SM.getFileManager().getVirtualFileSystem())),
39 if (AlwaysInstrument->inSection(
"xray_always_instrument",
"fun", FunctionName,
41 AttrList->inSection(
"always",
"fun", FunctionName,
"arg1"))
43 if (AlwaysInstrument->inSection(
"xray_always_instrument",
"fun",
45 AttrList->inSection(
"always",
"fun", FunctionName))
48 if (NeverInstrument->inSection(
"xray_never_instrument",
"fun",
50 AttrList->inSection(
"never",
"fun", FunctionName))
59 if (AlwaysInstrument->inSection(
"xray_always_instrument",
"src",
Filename,
63 if (NeverInstrument->inSection(
"xray_never_instrument",
"src",
Filename,
Defines the clang::FileManager interface and associated types.
Defines the SourceManager interface.
Encodes a location in the source.
bool isValid() const
Return true if this is a valid SourceLocation object.
This class handles loading and caching of source files into memory.
SourceLocation getFileLoc(SourceLocation Loc) const
Given Loc, if it is a macro location return the expansion location or the spelling location,...
StringRef getFilename(SourceLocation SpellingLoc) const
Return the filename of the file containing a SourceLocation.
ImbueAttribute shouldImbueLocation(SourceLocation Loc, StringRef Category=StringRef()) const
ImbueAttribute shouldImbueFunctionsInFile(StringRef Filename, StringRef Category=StringRef()) const
ImbueAttribute shouldImbueFunction(StringRef FunctionName) const
XRayFunctionFilter(ArrayRef< std::string > AlwaysInstrumentPaths, ArrayRef< std::string > NeverInstrumentPaths, ArrayRef< std::string > AttrListPaths, SourceManager &SM)
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.