1#ifndef ROSE_BinaryAnalysis_Partitioner2_Reference_H
2#define ROSE_BinaryAnalysis_Partitioner2_Reference_H
3#include <featureTests.h>
4#ifdef ROSE_ENABLE_BINARY_ANALYSIS
5#include <Rose/BinaryAnalysis/Partitioner2/BasicTypes.h>
12namespace BinaryAnalysis {
13namespace Partitioner2 {
Reference to a function, basic block, instruction, or address.
Reference(SgAsmInstruction *, const Sawyer::Optional< rose_addr_t > &=Sawyer::Nothing())
Constructor.
bool hasBasicBlock() const
Predicate for having a basic block.
bool hasInstruction() const
Predicate for having an instruction.
@ EMPTY
Reference points to nothing and has no address.
@ BASIC_BLOCK
Reference points to a basic block but not an instruction or a stored address.
@ ADDRESS
Reference points to nothing but has an address.
@ FUNCTION
Reference points to a function but not a basic block or instruction, and has no stored address.
@ INSTRUCTION
Reference points to an instruction but no stored address.
Reference(const FunctionPtr &, const BasicBlockPtr &, SgAsmInstruction *=nullptr, const Sawyer::Optional< rose_addr_t > &=Sawyer::Nothing())
Constructor.
bool hasExplicitAddress() const
Predicate for having a stored address.
bool hasFunction() const
Predicate for having a function.
bool isEmpty() const
Predicate for emptiness.
BasicBlockPtr basicBlock() const
Optional basic block pointer.
FunctionPtr function() const
Optional function pointer.
Reference(const FunctionPtr &)
Constructor.
rose_addr_t address() const
Address.
Granularity granularity() const
Reference granularity.
bool operator<(const Reference &other) const
Compare two references.
bool operator==(const Reference &other) const
Whether two references are equal.
Reference(rose_addr_t address)
Constructor.
SgAsmInstruction * instruction() const
Optional instruction pointer.
Reference(const BasicBlockPtr &, SgAsmInstruction *=nullptr, const Sawyer::Optional< rose_addr_t > &=Sawyer::Nothing())
Constructor.
Holds a value or nothing.
Base class for machine instructions.