clang  14.0.0git
Public Member Functions | Public Attributes | List of all members
clang::CodeGenOptions::OptRemark Struct Reference

Optimization remark with an optional regular expression pattern. More...

#include "clang/Basic/CodeGenOptions.h"

Collaboration diagram for clang::CodeGenOptions::OptRemark:
Collaboration graph
[legend]

Public Member Functions

 OptRemark ()
 By default, optimization remark is missing. More...
 
bool hasValidPattern () const
 Returns true iff the optimization remark holds a valid regular expression. More...
 
bool patternMatches (StringRef String) const
 Matches the given string against the regex, if there is some. More...
 

Public Attributes

RemarkKind Kind
 
std::string Pattern
 
std::shared_ptr< llvm::Regex > Regex
 

Detailed Description

Optimization remark with an optional regular expression pattern.

Definition at line 296 of file CodeGenOptions.h.

Constructor & Destructor Documentation

◆ OptRemark()

clang::CodeGenOptions::OptRemark::OptRemark ( )
inline

By default, optimization remark is missing.

Definition at line 302 of file CodeGenOptions.h.

Member Function Documentation

◆ hasValidPattern()

bool clang::CodeGenOptions::OptRemark::hasValidPattern ( ) const
inline

Returns true iff the optimization remark holds a valid regular expression.

Definition at line 306 of file CodeGenOptions.h.

References Regex.

Referenced by patternMatches().

◆ patternMatches()

bool clang::CodeGenOptions::OptRemark::patternMatches ( StringRef  String) const
inline

Matches the given string against the regex, if there is some.

Definition at line 309 of file CodeGenOptions.h.

References hasValidPattern(), and Regex.

Referenced by clang::BackendConsumer::OptimizationRemarkHandler().

Member Data Documentation

◆ Kind

RemarkKind clang::CodeGenOptions::OptRemark::Kind

Definition at line 297 of file CodeGenOptions.h.

◆ Pattern

std::string clang::CodeGenOptions::OptRemark::Pattern

Definition at line 298 of file CodeGenOptions.h.

◆ Regex

std::shared_ptr<llvm::Regex> clang::CodeGenOptions::OptRemark::Regex

Definition at line 299 of file CodeGenOptions.h.

Referenced by hasValidPattern(), and patternMatches().


The documentation for this struct was generated from the following file: