X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FIR%2FDataLayout.cpp;h=12723c09b66e3c1fd5a532aa0ab09433d98f02cc;hb=f985aecb027cd51438851358235b27cd8c72340b;hp=162f3d3ac373de11a0866db60517a642d47b284a;hpb=c4bdb93d6a4d8eb40584554e0cc4fc3e3732f707;p=oota-llvm.git diff --git a/lib/IR/DataLayout.cpp b/lib/IR/DataLayout.cpp index 162f3d3ac37..12723c09b66 100644 --- a/lib/IR/DataLayout.cpp +++ b/lib/IR/DataLayout.cpp @@ -390,7 +390,7 @@ static bool comparePointerAlignElem(const PointerAlignElem &A, } DataLayout::PointersTy::iterator -DataLayout::findPoiterLowerBound(uint32_t AddressSpace) { +DataLayout::findPointerLowerBound(uint32_t AddressSpace) { return std::lower_bound(Pointers.begin(), Pointers.end(), AddressSpace, comparePointerAlignElem); } @@ -399,7 +399,7 @@ void DataLayout::setPointerAlignment(uint32_t AddrSpace, unsigned ABIAlign, unsigned PrefAlign, uint32_t TypeByteWidth) { assert(ABIAlign <= PrefAlign && "Preferred alignment worse than ABI!"); - PointersTy::iterator I = findPoiterLowerBound(AddrSpace); + PointersTy::iterator I = findPointerLowerBound(AddrSpace); if (I == Pointers.end() || I->AddressSpace != AddrSpace) { Pointers.insert(I, PointerAlignElem::get(AddrSpace, ABIAlign, PrefAlign, TypeByteWidth)); @@ -597,27 +597,27 @@ std::string DataLayout::getStringRepresentation() const { } unsigned DataLayout::getPointerABIAlignment(unsigned AS) const { - PointersTy::const_iterator I = findPoiterLowerBound(AS); + PointersTy::const_iterator I = findPointerLowerBound(AS); if (I == Pointers.end() || I->AddressSpace != AS) { - I = findPoiterLowerBound(0); + I = findPointerLowerBound(0); assert(I->AddressSpace == 0); } return I->ABIAlign; } unsigned DataLayout::getPointerPrefAlignment(unsigned AS) const { - PointersTy::const_iterator I = findPoiterLowerBound(AS); + PointersTy::const_iterator I = findPointerLowerBound(AS); if (I == Pointers.end() || I->AddressSpace != AS) { - I = findPoiterLowerBound(0); + I = findPointerLowerBound(0); assert(I->AddressSpace == 0); } return I->PrefAlign; } unsigned DataLayout::getPointerSize(unsigned AS) const { - PointersTy::const_iterator I = findPoiterLowerBound(AS); + PointersTy::const_iterator I = findPointerLowerBound(AS); if (I == Pointers.end() || I->AddressSpace != AS) { - I = findPoiterLowerBound(0); + I = findPointerLowerBound(0); assert(I->AddressSpace == 0); } return I->TypeByteWidth;