mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-13 07:00:59 +00:00
MC: Add section layout order indices to MCSectionData.
llvm-svn: 103715
This commit is contained in:
parent
bc6fabbd3e
commit
5a601f9e09
@ -392,6 +392,9 @@ private:
|
||||
/// Ordinal - The section index in the assemblers section list.
|
||||
unsigned Ordinal;
|
||||
|
||||
/// LayoutOrder - The index of this section in the layout order.
|
||||
unsigned LayoutOrder;
|
||||
|
||||
/// Alignment - The maximum alignment seen in this section.
|
||||
unsigned Alignment;
|
||||
|
||||
@ -426,6 +429,9 @@ public:
|
||||
unsigned getOrdinal() const { return Ordinal; }
|
||||
void setOrdinal(unsigned Value) { Ordinal = Value; }
|
||||
|
||||
unsigned getLayoutOrder() const { return LayoutOrder; }
|
||||
void setLayoutOrder(unsigned Value) { LayoutOrder = Value; }
|
||||
|
||||
/// @name Fragment Access
|
||||
/// @{
|
||||
|
||||
|
@ -601,6 +601,10 @@ void MCAssembler::Finish() {
|
||||
// Create the layout object.
|
||||
MCAsmLayout Layout(*this);
|
||||
|
||||
// Assign layout order indices.
|
||||
for (unsigned i = 0, e = Layout.getSectionOrder().size(); i != e; ++i)
|
||||
Layout.getSectionOrder()[i]->setLayoutOrder(i);
|
||||
|
||||
// Insert additional align fragments for concrete sections to explicitly pad
|
||||
// the previous section to match their alignment requirements. This is for
|
||||
// 'gas' compatibility, it shouldn't strictly be necessary.
|
||||
|
Loading…
x
Reference in New Issue
Block a user