aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2010-12-06 03:48:09 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2010-12-06 03:48:09 +0000
commitf8803fe4177739f9a6900198f601808eb27934d9 (patch)
tree98dcc5a9293c59cf7214520fef87c2f25917ca68
parentf3faf92636a7da01d3cfff1e969988b5fff795eb (diff)
downloadexternal_llvm-f8803fe4177739f9a6900198f601808eb27934d9.tar.gz
external_llvm-f8803fe4177739f9a6900198f601808eb27934d9.tar.bz2
external_llvm-f8803fe4177739f9a6900198f601808eb27934d9.zip
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
-rw-r--r--include/llvm/MC/MCAssembler.h2
-rw-r--r--lib/MC/ELFObjectWriter.cpp2
-rw-r--r--lib/MC/MCAssembler.cpp1
3 files changed, 2 insertions, 3 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 0fb3a8ce2d..16c527ffc1 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -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
/// @{
diff --git a/lib/MC/ELFObjectWriter.cpp b/lib/MC/ELFObjectWriter.cpp
index 1fc844cc4a..bd6c5f8549 100644
--- a/lib/MC/ELFObjectWriter.cpp
+++ b/lib/MC/ELFObjectWriter.cpp
@@ -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();
}
diff --git a/lib/MC/MCAssembler.cpp b/lib/MC/MCAssembler.cpp
index c4e775e2c9..ac0f31f79e 100644
--- a/lib/MC/MCAssembler.cpp
+++ b/lib/MC/MCAssembler.cpp
@@ -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)