summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-12 17:56:47 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-12 17:56:47 +0000
commitd13a0caf726e05c9bd939d752ef371d6d467ef28 (patch)
tree1bfb82f96164582416f1d2920c4ab2b919af3f91 /include
parent473a09d80a8d3ecb37ac0d01289c79f7cc4fc645 (diff)
downloadllvm-d13a0caf726e05c9bd939d752ef371d6d467ef28.tar.gz
llvm-d13a0caf726e05c9bd939d752ef371d6d467ef28.tar.bz2
llvm-d13a0caf726e05c9bd939d752ef371d6d467ef28.tar.xz
MC: Simplify LayoutSection to just take the index of the section to layout.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103627 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/MC/MCAsmLayout.h11
-rw-r--r--include/llvm/MC/MCAssembler.h12
2 files changed, 10 insertions, 13 deletions
diff --git a/include/llvm/MC/MCAsmLayout.h b/include/llvm/MC/MCAsmLayout.h
index bfd177d995..c4492a6299 100644
--- a/include/llvm/MC/MCAsmLayout.h
+++ b/include/llvm/MC/MCAsmLayout.h
@@ -50,11 +50,12 @@ public:
/// @name Section Access (in layout order)
/// @{
- iterator begin() { return SectionOrder.begin(); }
- const_iterator begin() const { return SectionOrder.begin(); }
-
- iterator end() {return SectionOrder.end();}
- const_iterator end() const {return SectionOrder.end();}
+ llvm::SmallVectorImpl<MCSectionData*> &getSectionOrder() {
+ return SectionOrder;
+ }
+ const llvm::SmallVectorImpl<MCSectionData*> &getSectionOrder() const {
+ return SectionOrder;
+ }
/// @}
/// @name Fragment Layout Data
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 08500f8d7a..c34c9519cd 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -668,14 +668,10 @@ private:
bool FragmentNeedsRelaxation(const MCInstFragment *IF,
const MCAsmLayout &Layout) const;
- /// LayoutSection - Assign the section the given \arg StartAddress, and then
- /// assign offsets and sizes to the fragments in the section \arg SD, and
- /// update the section size.
- ///
- /// \return The address at the end of the section, for use in laying out the
- /// succeeding section.
- uint64_t LayoutSection(MCSectionData &SD, MCAsmLayout &Layout,
- uint64_t StartAddress);
+ /// LayoutSection - Performs layout of the section referenced by the given
+ /// \arg SectionOrderIndex. The layout assumes that the previous section has
+ /// already been layed out correctly.
+ void LayoutSection(MCAsmLayout &Layout, unsigned SectionOrderIndex);
/// LayoutOnce - Perform one layout iteration and return true if any offsets
/// were adjusted.