diff options
author | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2009-05-09 07:06:46 +0000 |
commit | af9eaa830a9e866f61b6e59b448712de52dced25 (patch) | |
tree | a34b5c08eae117510ce50dc9f05b6f3e9b6d8e3e /llvm/lib/Analysis/ConstantFolding.cpp | |
parent | 6631d7c4be2041b15c5f187d1f144f2de7182cb7 (diff) | |
download | bcm5719-llvm-af9eaa830a9e866f61b6e59b448712de52dced25.tar.gz bcm5719-llvm-af9eaa830a9e866f61b6e59b448712de52dced25.zip |
Rename PaddedSize to AllocSize, in the hope that this
will make it more obvious what it represents, and stop
it being confused with the StoreSize.
llvm-svn: 71349
Diffstat (limited to 'llvm/lib/Analysis/ConstantFolding.cpp')
-rw-r--r-- | llvm/lib/Analysis/ConstantFolding.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp index 7c99325b2dd..00b54413aa2 100644 --- a/llvm/lib/Analysis/ConstantFolding.cpp +++ b/llvm/lib/Analysis/ConstantFolding.cpp @@ -77,7 +77,7 @@ static bool IsConstantOffsetFromGlobal(Constant *C, GlobalValue *&GV, Offset += TD.getStructLayout(ST)->getElementOffset(CI->getZExtValue()); } else { const SequentialType *SQT = cast<SequentialType>(*GTI); - Offset += TD.getTypePaddedSize(SQT->getElementType())*CI->getSExtValue(); + Offset += TD.getTypeAllocSize(SQT->getElementType())*CI->getSExtValue(); } } return true; @@ -405,8 +405,8 @@ Constant *llvm::ConstantFoldInstOperands(unsigned Opcode, const Type *DestTy, if (const ArrayType *AT = dyn_cast<ArrayType>(GVTy->getElementType())) { const Type *ElTy = AT->getElementType(); - uint64_t PaddedSize = TD->getTypePaddedSize(ElTy); - APInt PSA(L->getValue().getBitWidth(), PaddedSize); + uint64_t AllocSize = TD->getTypeAllocSize(ElTy); + APInt PSA(L->getValue().getBitWidth(), AllocSize); if (ElTy == cast<PointerType>(DestTy)->getElementType() && L->getValue().urem(PSA) == 0) { APInt ElemIdx = L->getValue().udiv(PSA); |