forked from OSchip/llvm-project
Fix typo. Thanks to Roman Divacky for noticing it.
llvm-svn: 202277
This commit is contained in:
parent
ae593f1563
commit
e8ae0dba52
|
@ -118,11 +118,12 @@ private:
|
||||||
typedef SmallVector<PointerAlignElem, 8> PointersTy;
|
typedef SmallVector<PointerAlignElem, 8> PointersTy;
|
||||||
PointersTy Pointers;
|
PointersTy Pointers;
|
||||||
|
|
||||||
PointersTy::const_iterator findPoiterLowerBound(uint32_t AddressSpace) const {
|
PointersTy::const_iterator
|
||||||
return const_cast<DataLayout *>(this)->findPoiterLowerBound(AddressSpace);
|
findPointerLowerBound(uint32_t AddressSpace) const {
|
||||||
|
return const_cast<DataLayout *>(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
|
/// InvalidAlignmentElem - This member is a signal that a requested alignment
|
||||||
/// type and bit width were not found in the SmallVector.
|
/// type and bit width were not found in the SmallVector.
|
||||||
|
|
|
@ -390,7 +390,7 @@ static bool comparePointerAlignElem(const PointerAlignElem &A,
|
||||||
}
|
}
|
||||||
|
|
||||||
DataLayout::PointersTy::iterator
|
DataLayout::PointersTy::iterator
|
||||||
DataLayout::findPoiterLowerBound(uint32_t AddressSpace) {
|
DataLayout::findPointerLowerBound(uint32_t AddressSpace) {
|
||||||
return std::lower_bound(Pointers.begin(), Pointers.end(), AddressSpace,
|
return std::lower_bound(Pointers.begin(), Pointers.end(), AddressSpace,
|
||||||
comparePointerAlignElem);
|
comparePointerAlignElem);
|
||||||
}
|
}
|
||||||
|
@ -399,7 +399,7 @@ void DataLayout::setPointerAlignment(uint32_t AddrSpace, unsigned ABIAlign,
|
||||||
unsigned PrefAlign,
|
unsigned PrefAlign,
|
||||||
uint32_t TypeByteWidth) {
|
uint32_t TypeByteWidth) {
|
||||||
assert(ABIAlign <= PrefAlign && "Preferred alignment worse than ABI!");
|
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) {
|
if (I == Pointers.end() || I->AddressSpace != AddrSpace) {
|
||||||
Pointers.insert(I, PointerAlignElem::get(AddrSpace, ABIAlign, PrefAlign,
|
Pointers.insert(I, PointerAlignElem::get(AddrSpace, ABIAlign, PrefAlign,
|
||||||
TypeByteWidth));
|
TypeByteWidth));
|
||||||
|
@ -597,27 +597,27 @@ std::string DataLayout::getStringRepresentation() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DataLayout::getPointerABIAlignment(unsigned AS) 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) {
|
if (I == Pointers.end() || I->AddressSpace != AS) {
|
||||||
I = findPoiterLowerBound(0);
|
I = findPointerLowerBound(0);
|
||||||
assert(I->AddressSpace == 0);
|
assert(I->AddressSpace == 0);
|
||||||
}
|
}
|
||||||
return I->ABIAlign;
|
return I->ABIAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DataLayout::getPointerPrefAlignment(unsigned AS) const {
|
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) {
|
if (I == Pointers.end() || I->AddressSpace != AS) {
|
||||||
I = findPoiterLowerBound(0);
|
I = findPointerLowerBound(0);
|
||||||
assert(I->AddressSpace == 0);
|
assert(I->AddressSpace == 0);
|
||||||
}
|
}
|
||||||
return I->PrefAlign;
|
return I->PrefAlign;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned DataLayout::getPointerSize(unsigned AS) const {
|
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) {
|
if (I == Pointers.end() || I->AddressSpace != AS) {
|
||||||
I = findPoiterLowerBound(0);
|
I = findPointerLowerBound(0);
|
||||||
assert(I->AddressSpace == 0);
|
assert(I->AddressSpace == 0);
|
||||||
}
|
}
|
||||||
return I->TypeByteWidth;
|
return I->TypeByteWidth;
|
||||||
|
|
Loading…
Reference in New Issue