aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCAssembler.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-25 01:03:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-25 01:03:24 +0000
commit7c3d45a03e64ac1b5b2ecdb7153989fd7cebfd2c (patch)
treed275ab0f475a75a7fbee115915851ba82dbcb205 /include/llvm/MC/MCAssembler.h
parente9cfd685f5916a45e7cd36e51191cec16b02189d (diff)
downloadexternal_llvm-7c3d45a03e64ac1b5b2ecdb7153989fd7cebfd2c.zip
external_llvm-7c3d45a03e64ac1b5b2ecdb7153989fd7cebfd2c.tar.gz
external_llvm-7c3d45a03e64ac1b5b2ecdb7153989fd7cebfd2c.tar.bz2
MC: Eliminate MC{Fragment,{Section,Symbol}Data}::getAddress.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99467 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r--include/llvm/MC/MCAssembler.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 54c91a2..51fb88b 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -57,6 +57,8 @@ public:
};
class MCFragment : public ilist_node<MCFragment> {
+ friend class MCAsmLayout;
+
MCFragment(const MCFragment&); // DO NOT IMPLEMENT
void operator=(const MCFragment&); // DO NOT IMPLEMENT
@@ -108,8 +110,6 @@ public:
//
// FIXME: This could all be kept private to the assembler implementation.
- uint64_t getAddress() const;
-
uint64_t getFileSize() const {
assert(FileSize != ~UINT64_C(0) && "File size not set!");
return FileSize;
@@ -390,6 +390,8 @@ public:
// we anticipate the fast path being through an MCAssembler, the only reason to
// keep it out is for API abstraction.
class MCSectionData : public ilist_node<MCSectionData> {
+ friend class MCAsmLayout;
+
MCSectionData(const MCSectionData&); // DO NOT IMPLEMENT
void operator=(const MCSectionData&); // DO NOT IMPLEMENT
@@ -469,12 +471,6 @@ public:
//
// FIXME: This could all be kept private to the assembler implementation.
- uint64_t getAddress() const {
- assert(Address != ~UINT64_C(0) && "Address not set!");
- return Address;
- }
- void setAddress(uint64_t Value) { Address = Value; }
-
uint64_t getSize() const {
assert(Size != ~UINT64_C(0) && "File size not set!");
return Size;
@@ -549,11 +545,6 @@ public:
uint64_t getOffset() const { return Offset; }
void setOffset(uint64_t Value) { Offset = Value; }
- uint64_t getAddress() const {
- assert(getFragment() && "Invalid getAddress() on undefined symbol!");
- return getFragment()->getAddress() + getOffset();
- }
-
/// @}
/// @name Symbol Attributes
/// @{