mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 23:17:16 +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:
@@ -171,12 +171,12 @@ bool AAEval::runOnFunction(Function &F) {
|
||||
for (SetVector<Value *>::iterator I1 = Pointers.begin(), E = Pointers.end();
|
||||
I1 != E; ++I1) {
|
||||
uint64_t I1Size = AliasAnalysis::UnknownSize;
|
||||
const Type *I1ElTy = cast<PointerType>((*I1)->getType())->getElementType();
|
||||
Type *I1ElTy = cast<PointerType>((*I1)->getType())->getElementType();
|
||||
if (I1ElTy->isSized()) I1Size = AA.getTypeStoreSize(I1ElTy);
|
||||
|
||||
for (SetVector<Value *>::iterator I2 = Pointers.begin(); I2 != I1; ++I2) {
|
||||
uint64_t I2Size = AliasAnalysis::UnknownSize;
|
||||
const Type *I2ElTy =cast<PointerType>((*I2)->getType())->getElementType();
|
||||
Type *I2ElTy =cast<PointerType>((*I2)->getType())->getElementType();
|
||||
if (I2ElTy->isSized()) I2Size = AA.getTypeStoreSize(I2ElTy);
|
||||
|
||||
switch (AA.alias(*I1, I1Size, *I2, I2Size)) {
|
||||
@@ -207,7 +207,7 @@ bool AAEval::runOnFunction(Function &F) {
|
||||
for (SetVector<Value *>::iterator V = Pointers.begin(), Ve = Pointers.end();
|
||||
V != Ve; ++V) {
|
||||
uint64_t Size = AliasAnalysis::UnknownSize;
|
||||
const Type *ElTy = cast<PointerType>((*V)->getType())->getElementType();
|
||||
Type *ElTy = cast<PointerType>((*V)->getType())->getElementType();
|
||||
if (ElTy->isSized()) Size = AA.getTypeStoreSize(ElTy);
|
||||
|
||||
switch (AA.getModRefInfo(*C, *V, Size)) {
|
||||
|
||||
Reference in New Issue
Block a user