summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCAsmLayout.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-05-14 00:37:21 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-05-14 00:37:21 +0000
commit9005d45a990ef46f06800bd6bd6a7d1298a33645 (patch)
tree08945cb3abfe39553b3e85635477f14b81a38532 /include/llvm/MC/MCAsmLayout.h
parent11c411151643e80b9da0acf16f8bb3ec9c6d2754 (diff)
downloadllvm-9005d45a990ef46f06800bd6bd6a7d1298a33645.tar.gz
llvm-9005d45a990ef46f06800bd6bd6a7d1298a33645.tar.bz2
llvm-9005d45a990ef46f06800bd6bd6a7d1298a33645.tar.xz
MC: Extend MCAsmLayout to explicitly track which fragments have been layed out, and enforce several invariants to LayoutFragment to ensure we only do layout in a sensible order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103753 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAsmLayout.h')
-rw-r--r--include/llvm/MC/MCAsmLayout.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmLayout.h b/include/llvm/MC/MCAsmLayout.h
index 526ecad931..991d262135 100644
--- a/include/llvm/MC/MCAsmLayout.h
+++ b/include/llvm/MC/MCAsmLayout.h
@@ -36,6 +36,14 @@ private:
/// List of sections in layout order.
llvm::SmallVector<MCSectionData*, 16> SectionOrder;
+ /// The last fragment which was layed out, or 0 if nothing has been layed
+ /// out. Fragments are always layed out in order, so all fragments with a
+ /// lower ordinal will be up to date.
+ mutable MCFragment *LastValidFragment;
+
+ bool isSectionUpToDate(const MCSectionData *SD) const;
+ bool isFragmentUpToDate(const MCFragment *F) const;
+
public:
MCAsmLayout(MCAssembler &_Assembler);