Remove the getAddress getter, initialize Ordinal in the constructor and use

that on the ELF writer to detect a section we created.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120981 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2010-12-06 03:48:09 +00:00
parent f3faf92636
commit f8803fe417
3 changed files with 2 additions and 3 deletions

View File

@ -476,8 +476,6 @@ public:
unsigned getLayoutOrder() const { return LayoutOrder; }
void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
uint64_t getAddress() const { return Address; }
/// @name Fragment Access
/// @{

View File

@ -1285,7 +1285,7 @@ void ELFObjectWriter::WriteSection(MCAssembler &Asm,
}
static bool IsELFMetaDataSection(const MCSectionData &SD) {
return SD.getAddress() == ~UINT64_C(0) &&
return SD.getOrdinal() == ~UINT32_C(0) &&
!SD.getSection().isVirtualSection();
}

View File

@ -218,6 +218,7 @@ MCSectionData::MCSectionData() : Section(0) {}
MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A)
: Section(&_Section),
Ordinal(~UINT32_C(0)),
Alignment(1),
Address(~UINT64_C(0)),
HasInstructions(false)