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
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index 1fc844c..bd6c5f8 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -1285,7 +1285,7 @@
}
static bool IsELFMetaDataSection(const MCSectionData &SD) {
- return SD.getAddress() == ~UINT64_C(0) &&
+ return SD.getOrdinal() == ~UINT32_C(0) &&
!SD.getSection().isVirtualSection();
}