LLVM  5.0.0
Public Types | Public Member Functions | Protected Member Functions | List of all members
llvm::SymbolRewriter::RewriteDescriptor Class Referenceabstract

The basic entity representing a rewrite operation. More...

#include "llvm/Transforms/Utils/SymbolRewriter.h"

Public Types

enum  Type { Type::Invalid, Type::Function, Type::GlobalVariable, Type::NamedAlias }
 

Public Member Functions

 RewriteDescriptor (const RewriteDescriptor &)=delete
 
RewriteDescriptor & operator= (const RewriteDescriptor &)=delete
 
virtual ~RewriteDescriptor ()=default
 
Type getType () const
 
virtual bool performOnModule (Module &M)=0
 

Protected Member Functions

 RewriteDescriptor (Type T)
 

Detailed Description

The basic entity representing a rewrite operation.

It serves as the base class for any rewrite descriptor. It has a certain set of specializations which describe a particular rewrite.

The RewriteMapParser can be used to parse a mapping file that provides the mapping for rewriting the symbols. The descriptors individually describe whether to rewrite a function, global variable, or global alias. Each of these can be selected either by explicitly providing a name for the ones to be rewritten or providing a (posix compatible) regular expression that will select the symbols to rewrite. This descriptor list is passed to the SymbolRewriter pass.

Definition at line 68 of file SymbolRewriter.h.

Member Enumeration Documentation

Enumerator
Invalid 
Function 

invalid

GlobalVariable 

function - descriptor rewrites a function

NamedAlias 

global variable - descriptor rewrites a global variable

Definition at line 70 of file SymbolRewriter.h.

Constructor & Destructor Documentation

llvm::SymbolRewriter::RewriteDescriptor::RewriteDescriptor ( const RewriteDescriptor &  )
delete
virtual llvm::SymbolRewriter::RewriteDescriptor::~RewriteDescriptor ( )
virtualdefault
llvm::SymbolRewriter::RewriteDescriptor::RewriteDescriptor ( Type  T)
inlineexplicitprotected

Definition at line 86 of file SymbolRewriter.h.

Member Function Documentation

Type llvm::SymbolRewriter::RewriteDescriptor::getType ( ) const
inline

Definition at line 81 of file SymbolRewriter.h.

RewriteDescriptor& llvm::SymbolRewriter::RewriteDescriptor::operator= ( const RewriteDescriptor &  )
delete
virtual bool llvm::SymbolRewriter::RewriteDescriptor::performOnModule ( Module &  M)
pure virtual

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