LLVM API Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | Friends | List of all members
llvm::MCDataAtom Class Reference

An atom consising of a sequence of bytes. More...

#include <MCAtom.h>

Inheritance diagram for llvm::MCDataAtom:
Inheritance graph
[legend]
Collaboration diagram for llvm::MCDataAtom:
Collaboration graph
[legend]

Public Member Functions

void addData (const MCData &D)
 Append a data entry, expanding the atom if necessary. More...
 
ArrayRef< MCDatagetData () const
 Get a reference to the data in this atom. More...
 
Atom type specific split/truncate logic.
MCDataAtomsplit (uint64_t SplitPt) LLVM_OVERRIDE
 Splits the atom in two at a given address. More...
 
void truncate (uint64_t TruncPt) LLVM_OVERRIDE
 Truncates an atom, discarding everything after TruncPt. More...
 
- Public Member Functions inherited from llvm::MCAtom
virtual ~MCAtom ()
 
AtomKind getKind () const
 
uint64_t getBeginAddr () const
 Get the start address of the atom. More...
 
uint64_t getEndAddr () const
 Get the end address, i.e. the last one inside the atom. More...
 
StringRef getName () const
 
void setName (StringRef NewName)
 

Static Public Member Functions

static bool classof (const MCAtom *A)
 

Friends

class MCModule
 

Additional Inherited Members

- Public Types inherited from llvm::MCAtom
enum  AtomKind { TextAtom, DataAtom }
 
- Protected Member Functions inherited from llvm::MCAtom
 MCAtom (AtomKind K, MCModule *P, uint64_t B, uint64_t E)
 
void remap (uint64_t NewBegin, uint64_t NewEnd)
 Remap the atom, using the given range, updating Begin/End. One or both of the bounds can remain the same, but overlapping with other atoms in the module is still forbidden. More...
 
void remapForTruncate (uint64_t TruncPt)
 Remap the atom to prepare for a truncation at TruncPt. Equivalent to: More...
 
void remapForSplit (uint64_t SplitPt, uint64_t &LBegin, uint64_t &LEnd, uint64_t &RBegin, uint64_t &REnd)
 Remap the atom to prepare for a split at SplitPt. The bounds for the resulting atoms are returned in {L,R}{Begin,End}. The current atom is truncated to LEnd. More...
 
- Protected Attributes inherited from llvm::MCAtom
const AtomKind Kind
 
std::string Name
 
MCModuleParent
 
uint64_t Begin
 
uint64_t End
 

Detailed Description

An atom consising of a sequence of bytes.

Definition at line 170 of file MCAtom.h.

Member Function Documentation

void MCDataAtom::addData ( const MCData D)

Append a data entry, expanding the atom if necessary.

Definition at line 48 of file MCAtom.cpp.

References llvm::MCAtom::Begin, llvm::MCAtom::End, and llvm::MCAtom::remap().

static bool llvm::MCDataAtom::classof ( const MCAtom A)
inlinestatic

Definition at line 187 of file MCAtom.h.

References llvm::MCAtom::DataAtom, and llvm::MCAtom::getKind().

ArrayRef<MCData> llvm::MCDataAtom::getData ( ) const
inline

Get a reference to the data in this atom.

Definition at line 178 of file MCAtom.h.

MCDataAtom * MCDataAtom::split ( uint64_t  SplitPt)
virtual

Splits the atom in two at a given address.

Parameters
SplitPtAddress at which to start a new atom, splitting this one.
Returns
The newly created atom starting at SplitPt.

Implements llvm::MCAtom.

Definition at line 60 of file MCAtom.cpp.

References llvm::MCModule::createDataAtom(), llvm::MCAtom::getName(), I, llvm::MCAtom::Parent, llvm::MCAtom::remapForSplit(), and llvm::MCAtom::setName().

void MCDataAtom::truncate ( uint64_t  TruncPt)
virtual

Truncates an atom, discarding everything after TruncPt.

Parameters
TruncPtLast byte address to be contained in this atom.

Implements llvm::MCAtom.

Definition at line 54 of file MCAtom.cpp.

References llvm::MCAtom::Begin, and llvm::MCAtom::remapForTruncate().

Friends And Related Function Documentation

friend class MCModule
friend

Definition at line 189 of file MCAtom.h.


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