mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-23 02:32:11 +00:00
For PR1202:
Make sure we found an existing Alignment before overwriting it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34308 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5d4a9f7731
commit
16db3caba8
@ -245,7 +245,8 @@ TargetData::setAlignment(AlignTypeEnum align_type, unsigned char abi_align,
|
||||
std::pair<align_iterator, align_iterator> ins_result =
|
||||
std::equal_range(Alignments.begin(), Alignments.end(), elt);
|
||||
align_iterator I = ins_result.first;
|
||||
if (I->AlignType == align_type && I->TypeBitWidth == bit_width) {
|
||||
if (I != Alignments.end() && I->AlignType == align_type &&
|
||||
I->TypeBitWidth == bit_width) {
|
||||
// Update the abi, preferred alignments.
|
||||
I->ABIAlign = abi_align;
|
||||
I->PrefAlign = pref_align;
|
||||
|
Loading…
x
Reference in New Issue
Block a user