mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
land David Blaikie's patch to de-constify Type, with a few tweaks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135375 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -100,7 +100,7 @@ static bool isEscapeSource(const Value *V) {
|
||||
/// getObjectSize - Return the size of the object specified by V, or
|
||||
/// UnknownSize if unknown.
|
||||
static uint64_t getObjectSize(const Value *V, const TargetData &TD) {
|
||||
const Type *AccessTy;
|
||||
Type *AccessTy;
|
||||
if (const GlobalVariable *GV = dyn_cast<GlobalVariable>(V)) {
|
||||
if (!GV->hasDefinitiveInitializer())
|
||||
return AliasAnalysis::UnknownSize;
|
||||
@ -317,7 +317,7 @@ DecomposeGEPExpression(const Value *V, int64_t &BaseOffs,
|
||||
E = GEPOp->op_end(); I != E; ++I) {
|
||||
Value *Index = *I;
|
||||
// Compute the (potentially symbolic) offset in bytes for this index.
|
||||
if (const StructType *STy = dyn_cast<StructType>(*GTI++)) {
|
||||
if (StructType *STy = dyn_cast<StructType>(*GTI++)) {
|
||||
// For a struct, add the member offset.
|
||||
unsigned FieldNo = cast<ConstantInt>(Index)->getZExtValue();
|
||||
if (FieldNo == 0) continue;
|
||||
|
Reference in New Issue
Block a user