LLVM  6.0.0svn
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
 
RewriteDescriptoroperator= (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 69 of file SymbolRewriter.h.

Member Enumeration Documentation

◆ Type

Enumerator
Invalid 
Function 

invalid

GlobalVariable 

function - descriptor rewrites a function

NamedAlias 

global variable - descriptor rewrites a global variable

Definition at line 71 of file SymbolRewriter.h.

Constructor & Destructor Documentation

◆ RewriteDescriptor() [1/2]

llvm::SymbolRewriter::RewriteDescriptor::RewriteDescriptor ( const RewriteDescriptor )
delete

◆ ~RewriteDescriptor()

virtual llvm::SymbolRewriter::RewriteDescriptor::~RewriteDescriptor ( )
virtualdefault

◆ RewriteDescriptor() [2/2]

llvm::SymbolRewriter::RewriteDescriptor::RewriteDescriptor ( Type  T)
inlineexplicitprotected

Definition at line 87 of file SymbolRewriter.h.

References Kind.

Member Function Documentation

◆ getType()

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

Definition at line 82 of file SymbolRewriter.h.

References Kind.

Referenced by rewriteComdat().

◆ operator=()

RewriteDescriptor& llvm::SymbolRewriter::RewriteDescriptor::operator= ( const RewriteDescriptor )
delete

◆ performOnModule()

virtual bool llvm::SymbolRewriter::RewriteDescriptor::performOnModule ( Module M)
pure virtual

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