LLVM API Documentation
An atom consising of a sequence of bytes. More...
#include <MCAtom.h>
Public Member Functions | |
void | addData (const MCData &D) |
Append a data entry, expanding the atom if necessary. More... | |
ArrayRef< MCData > | getData () const |
Get a reference to the data in this atom. More... | |
Atom type specific split/truncate logic. | |
MCDataAtom * | split (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... | |
![]() | |
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 | |
![]() | |
enum | AtomKind { TextAtom, DataAtom } |
![]() | |
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... | |
![]() | |
const AtomKind | Kind |
std::string | Name |
MCModule * | Parent |
uint64_t | Begin |
uint64_t | End |
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().
Definition at line 187 of file MCAtom.h.
References llvm::MCAtom::DataAtom, and llvm::MCAtom::getKind().
|
virtual |
Splits the atom in two at a given address.
SplitPt | Address at which to start a new atom, splitting this one. |
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().
|
virtual |
Truncates an atom, discarding everything after TruncPt
.
TruncPt | Last 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().