mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-26 07:34:14 +00:00
add a "getPointerAddressSpace" helper method to LoadInst and StoreInst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80503 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
d91aafd005
commit
a07ae6be66
@ -277,6 +277,11 @@ public:
|
||||
const Value *getPointerOperand() const { return getOperand(0); }
|
||||
static unsigned getPointerOperandIndex() { return 0U; }
|
||||
|
||||
unsigned getPointerAddressSpace() const {
|
||||
return cast<PointerType>(getPointerOperand()->getType())->getAddressSpace();
|
||||
}
|
||||
|
||||
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const LoadInst *) { return true; }
|
||||
static inline bool classof(const Instruction *I) {
|
||||
@ -341,6 +346,10 @@ public:
|
||||
const Value *getPointerOperand() const { return getOperand(1); }
|
||||
static unsigned getPointerOperandIndex() { return 1U; }
|
||||
|
||||
unsigned getPointerAddressSpace() const {
|
||||
return cast<PointerType>(getPointerOperand()->getType())->getAddressSpace();
|
||||
}
|
||||
|
||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||
static inline bool classof(const StoreInst *) { return true; }
|
||||
static inline bool classof(const Instruction *I) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user