From f985aecb027cd51438851358235b27cd8c72340b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Wed, 26 Feb 2014 17:05:38 +0000 Subject: [PATCH] Fix typo. Thanks to Roman Divacky for noticing it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202277 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/IR/DataLayout.h | 7 ++++--- lib/IR/DataLayout.cpp | 16 ++++++++-------- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/include/llvm/IR/DataLayout.h b/include/llvm/IR/DataLayout.h index cfed302e657..d32b8402d64 100644 --- a/include/llvm/IR/DataLayout.h +++ b/include/llvm/IR/DataLayout.h @@ -118,11 +118,12 @@ private: typedef SmallVector PointersTy; PointersTy Pointers; - PointersTy::const_iterator findPoiterLowerBound(uint32_t AddressSpace) const { - return const_cast(this)->findPoiterLowerBound(AddressSpace); + PointersTy::const_iterator + findPointerLowerBound(uint32_t AddressSpace) const { + return const_cast(this)->findPointerLowerBound(AddressSpace); } - PointersTy::iterator findPoiterLowerBound(uint32_t AddressSpace); + PointersTy::iterator findPointerLowerBound(uint32_t AddressSpace); /// InvalidAlignmentElem - This member is a signal that a requested alignment /// type and bit width were not found in the SmallVector. 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; -- 2.34.1