LLVM
8.0.1
|
#include "llvm/Support/SpecialCaseList.h"
Classes | |
class | Matcher |
Represents a set of regular expressions. More... | |
struct | Section |
Public Member Functions | |
~SpecialCaseList () | |
bool | inSection (StringRef Section, StringRef Prefix, StringRef Query, StringRef Category=StringRef()) const |
Returns true, if special case list contains a line. More... | |
unsigned | inSectionBlame (StringRef Section, StringRef Prefix, StringRef Query, StringRef Category=StringRef()) const |
Returns the line number corresponding to the special case list entry if the special case list contains a line. More... | |
Static Public Member Functions | |
static std::unique_ptr< SpecialCaseList > | create (const std::vector< std::string > &Paths, std::string &Error) |
Parses the special case list entries from files. More... | |
static std::unique_ptr< SpecialCaseList > | create (const MemoryBuffer *MB, std::string &Error) |
Parses the special case list from a memory buffer. More... | |
static std::unique_ptr< SpecialCaseList > | createOrDie (const std::vector< std::string > &Paths) |
Parses the special case list entries from files. More... | |
Protected Types | |
using | SectionEntries = StringMap< StringMap< Matcher > > |
Protected Member Functions | |
bool | createInternal (const std::vector< std::string > &Paths, std::string &Error) |
bool | createInternal (const MemoryBuffer *MB, std::string &Error) |
SpecialCaseList ()=default | |
SpecialCaseList (SpecialCaseList const &)=delete | |
SpecialCaseList & | operator= (SpecialCaseList const &)=delete |
bool | parse (const MemoryBuffer *MB, StringMap< size_t > &SectionsMap, std::string &Error) |
Parses just-constructed SpecialCaseList entries from a memory buffer. More... | |
unsigned | inSectionBlame (const SectionEntries &Entries, StringRef Prefix, StringRef Query, StringRef Category) const |
Protected Attributes | |
std::vector< Section > | Sections |
Definition at line 67 of file SpecialCaseList.h.
|
protected |
Definition at line 131 of file SpecialCaseList.h.
llvm::SpecialCaseList::~SpecialCaseList | ( | ) |
Definition at line 201 of file SpecialCaseList.cpp.
|
protecteddefault |
Referenced by create().
|
protecteddelete |
|
static |
Parses the special case list entries from files.
On failure, returns 0 and writes an error message to string.
Definition at line 74 of file SpecialCaseList.cpp.
References SpecialCaseList().
Referenced by createOrDie().
|
static |
Parses the special case list from a memory buffer.
On failure, returns 0 and writes an error message to string.
Definition at line 82 of file SpecialCaseList.cpp.
References SpecialCaseList().
|
protected |
Definition at line 98 of file SpecialCaseList.cpp.
References llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), parse(), and Sections.
|
protected |
Definition at line 117 of file SpecialCaseList.cpp.
|
static |
Parses the special case list entries from files.
On failure, reports a fatal error.
Definition at line 91 of file SpecialCaseList.cpp.
References create(), llvm::Error, and llvm::report_fatal_error().
Referenced by INITIALIZE_PASS().
bool llvm::SpecialCaseList::inSection | ( | StringRef | Section, |
StringRef | Prefix, | ||
StringRef | Query, | ||
StringRef | Category = StringRef() |
||
) | const |
Returns true, if special case list contains a line.
where satisfies wildcard expression <E> in a given .
Definition at line 203 of file SpecialCaseList.cpp.
References inSectionBlame().
unsigned llvm::SpecialCaseList::inSectionBlame | ( | StringRef | Section, |
StringRef | Prefix, | ||
StringRef | Query, | ||
StringRef | Category = StringRef() |
||
) | const |
Returns the line number corresponding to the special case list entry if the special case list contains a line.
where satisfies wildcard expression <E> in a given . Returns zero if there is no blacklist entry corresponding to this expression.
Definition at line 208 of file SpecialCaseList.cpp.
References Sections.
Referenced by inSection().
|
protected |
Definition at line 221 of file SpecialCaseList.cpp.
References llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), and I.
|
protecteddelete |
|
protected |
Parses just-constructed SpecialCaseList entries from a memory buffer.
Definition at line 125 of file SpecialCaseList.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), E, llvm::SmallVectorTemplateCommon< T >::end(), llvm::StringMap< ValueTy, AllocatorTy >::end(), llvm::StringMap< ValueTy, AllocatorTy >::find(), llvm::MemoryBuffer::getBuffer(), I, llvm::Regex::isValid(), llvm::cl::Prefix, llvm::ARMBuildAttrs::Section, Sections, and llvm::StringRef::split().
Referenced by createInternal().
|
protected |
Definition at line 140 of file SpecialCaseList.h.
Referenced by createInternal(), inSectionBlame(), and parse().