mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Compare DataLayout by Value, not by pointer.
This fixes spurious warnings in llvm-link about the datalayout not matching. Thanks to Zalman Stern for reporting the bug! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202276 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -354,6 +354,16 @@ DataLayout::DataLayout(const Module *M) : LayoutMap(0) {
|
||||
reset("");
|
||||
}
|
||||
|
||||
bool DataLayout::operator==(const DataLayout &Other) const {
|
||||
bool Ret = LittleEndian == Other.LittleEndian &&
|
||||
StackNaturalAlign == Other.StackNaturalAlign &&
|
||||
ManglingMode == Other.ManglingMode &&
|
||||
LegalIntWidths == Other.LegalIntWidths &&
|
||||
Alignments == Other.Alignments && Pointers == Pointers;
|
||||
assert(Ret == (getStringRepresentation() == Other.getStringRepresentation()));
|
||||
return Ret;
|
||||
}
|
||||
|
||||
void
|
||||
DataLayout::setAlignment(AlignTypeEnum align_type, unsigned abi_align,
|
||||
unsigned pref_align, uint32_t bit_width) {
|
||||
|
Reference in New Issue
Block a user