9 #ifndef IR_SEG_SEGSTOREMEMNODE_H
10 #define IR_SEG_SEGSTOREMEMNODE_H
12 #include <llvm/IR/BasicBlock.h>
13 #include <llvm/IR/Function.h>
14 #include <llvm/IR/Instructions.h>
15 #include <llvm/IR/Value.h>
17 #include "IR/SEG/SymbolicExprGraph.h"
19 class PersistedSEGStoreMemNode;
36 Instruction *StoreSite =
nullptr;
37 WrappedInstruction *WrappedStoreSite =
nullptr;
38 Value *StoreValue =
nullptr;
39 WrappedValue *WrappedStoreValue =
nullptr;
48 virtual PersistedSEGObject *createPersistedObject()
const;
50 Instruction *getStoreSite()
const {
return StoreSite; }
52 WrappedInstruction *getWrappedStoreSite()
const {
return WrappedStoreSite; }
54 StoreInst *getStoreSiteAsStoreInst()
const {
57 return dyn_cast<StoreInst>(StoreSite);
60 WrappedStoreInst *getWrappedStoreSiteAsStoreInst(
void)
const {
61 if (!WrappedStoreSite) {
64 return dyn_cast<WrappedStoreInst>(WrappedStoreSite);
67 Value *getStoreValue()
const {
return StoreValue; }
69 WrappedValue *getWrappedStoreValue()
const {
return WrappedStoreValue; }
71 void dot(raw_fd_ostream &O)
const override;
73 virtual Instruction *getLLVMDbgInstruction()
const override;
75 virtual std::string getSrcFile()
const {
76 if (WrappedStoreSite) {
77 return WrappedStoreSite->getSrcFileName();
79 return SEGOperandNode::getSrcFile();
82 virtual std::int32_t getSrcLine()
const {
83 if (WrappedStoreSite) {
84 return WrappedStoreSite->getSrcLine();
86 return SEGOperandNode::getSrcLine();
91 return N->getKind() == SEGOBJK_StoreMem;