mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-06 04:31:08 +00:00
add a helper method.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82438 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b0f5973bee
commit
0c1f688954
@ -274,6 +274,18 @@ public:
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// hasAllConstantIndices - Return true if all of the indices of this GEP are
|
||||||
|
/// constant integers. If so, the result pointer and the first operand have
|
||||||
|
/// a constant offset between them.
|
||||||
|
bool hasAllConstantIndices() const {
|
||||||
|
for (const_op_iterator I = idx_begin(), E = idx_end(); I != E; ++I) {
|
||||||
|
if (!isa<ConstantInt>(I))
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
// Methods for support type inquiry through isa, cast, and dyn_cast:
|
||||||
static inline bool classof(const GEPOperator *) { return true; }
|
static inline bool classof(const GEPOperator *) { return true; }
|
||||||
static inline bool classof(const GetElementPtrInst *) { return true; }
|
static inline bool classof(const GetElementPtrInst *) { return true; }
|
||||||
|
Loading…
Reference in New Issue
Block a user