aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/MC/MCAssembler.h
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2010-03-25 07:10:11 +0000
committerDaniel Dunbar <daniel@zuster.org>2010-03-25 07:10:11 +0000
commit5a6e97a7e4e25265cd491f10cc9b0676ff5c0746 (patch)
tree4599ecc64c023d2d8020d379bec941255ab37814 /include/llvm/MC/MCAssembler.h
parentb026d64bf23c3b5c4df7b15185303ec6e7470387 (diff)
downloadexternal_llvm-5a6e97a7e4e25265cd491f10cc9b0676ff5c0746.zip
external_llvm-5a6e97a7e4e25265cd491f10cc9b0676ff5c0746.tar.gz
external_llvm-5a6e97a7e4e25265cd491f10cc9b0676ff5c0746.tar.bz2
MC: Explicity track section and fragment ordinals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC/MCAssembler.h')
-rw-r--r--include/llvm/MC/MCAssembler.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAssembler.h b/include/llvm/MC/MCAssembler.h
index 19cec1c..c34132d 100644
--- a/include/llvm/MC/MCAssembler.h
+++ b/include/llvm/MC/MCAssembler.h
@@ -91,6 +91,10 @@ private:
/// initialized.
uint64_t EffectiveSize;
+ /// Ordinal - The global index of this fragment. This is the index across all
+ /// sections, not just the parent section.
+ unsigned Ordinal;
+
/// @}
protected:
@@ -106,6 +110,9 @@ public:
MCSectionData *getParent() const { return Parent; }
void setParent(MCSectionData *Value) { Parent = Value; }
+ unsigned getOrdinal() const { return Ordinal; }
+ void setOrdinal(unsigned Value) { Ordinal = Value; }
+
static bool classof(const MCFragment *O) { return true; }
virtual void dump();
@@ -390,6 +397,9 @@ private:
iplist<MCFragment> Fragments;
const MCSection *Section;
+ /// Ordinal - The section index in the assemblers section list.
+ unsigned Ordinal;
+
/// Alignment - The maximum alignment seen in this section.
unsigned Alignment;
@@ -428,6 +438,9 @@ public:
bool hasInstructions() const { return HasInstructions; }
void setHasInstructions(bool Value) { HasInstructions = Value; }
+ unsigned getOrdinal() const { return Ordinal; }
+ void setOrdinal(unsigned Value) { Ordinal = Value; }
+
/// @name Fragment Access
/// @{
@@ -451,6 +464,8 @@ public:
bool empty() const { return Fragments.empty(); }
void dump();
+
+ /// @}
};
// FIXME: Same concerns as with SectionData.