1 #ifndef ROSE_BinaryAnalysis_Partitioner2_Reference_H
2 #define ROSE_BinaryAnalysis_Partitioner2_Reference_H
3 #include <featureTests.h>
4 #ifdef ROSE_ENABLE_BINARY_ANALYSIS
6 #include <Rose/BinaryAnalysis/Partitioner2/BasicBlock.h>
7 #include <Rose/BinaryAnalysis/Partitioner2/Function.h>
11 namespace BinaryAnalysis {
12 namespace Partitioner2 {
48 : function_(
function), bblock_(bblock), insn_(insn), address_(
address) {}
53 : bblock_(bblock), insn_(insn), address_(
address) {}
56 : insn_(insn), address_(
address) {}
59 : insn_(NULL), address_(address) {}
92 return function_!=NULL;
104 return bblock_!=NULL;
116 return insn_ != NULL;
bool hasBasicBlock() const
Predicate for having a basic block.
bool isEmpty() const
Predicate for emptiness.
SgAsmInstruction * instruction() const
Optional instruction pointer.
Reference(const Function::Ptr &function, const BasicBlock::Ptr &bblock=BasicBlock::Ptr(), SgAsmInstruction *insn=NULL, const Sawyer::Optional< rose_addr_t > &address=Sawyer::Nothing())
Constructor.
Reference points to a basic block but not an instruction or a stored address.
Reference to a function, basic block, instruction, or address.
Base class for machine instructions.
Reference points to nothing and has no address.
Function::Ptr function() const
Optional function pointer.
bool operator==(const Reference &other) const
Whether two references are equal.
Main namespace for the ROSE library.
Reference(rose_addr_t address)
Constructor.
Reference points to nothing but has an address.
rose_addr_t address() const
Address.
std::set< Reference > ReferenceSet
Set of references.
bool hasInstruction() const
Predicate for having an instruction.
Reference points to an instruction but no stored address.
Sawyer::Container::Map< Reference, ReferenceSet > CrossReferences
Cross references.
bool hasExplicitAddress() const
Predicate for having a stored address.
BasicBlock::Ptr basicBlock() const
Optional basic block pointer.
bool operator<(const Reference &other) const
Compare two references.
Granularity granularity() const
Reference granularity.
Reference(SgAsmInstruction *insn, const Sawyer::Optional< rose_addr_t > &address=Sawyer::Nothing())
Constructor.
Reference points to a function but not a basic block or instruction, and has no stored address...
bool hasFunction() const
Predicate for having a function.
Container associating values with keys.
Reference(const BasicBlock::Ptr &bblock, SgAsmInstruction *insn=NULL, const Sawyer::Optional< rose_addr_t > &address=Sawyer::Nothing())
Constructor.