aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCObjectFileInfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/MC/MCObjectFileInfo.h')
-rw-r--r--include/llvm/MC/MCObjectFileInfo.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/include/llvm/MC/MCObjectFileInfo.h b/include/llvm/MC/MCObjectFileInfo.h
index 2c5a0a15c3..d91b11b1f7 100644
--- a/include/llvm/MC/MCObjectFileInfo.h
+++ b/include/llvm/MC/MCObjectFileInfo.h
@@ -19,10 +19,14 @@
#include "llvm/MC/SectionKind.h"
namespace llvm {
-class MCContext;
-class MCSection;
-class Triple;
+ class MCContext;
+ class MCSection;
+ class Triple;
+ namespace Structors {
+ enum OutputOrder { None, PriorityOrder, ReversePriorityOrder };
+ }
+
class MCObjectFileInfo {
protected:
/// CommDirectiveSupportsAlignment - True if .comm supports alignment. This
@@ -164,6 +168,11 @@ protected:
const MCSection *PDataSection;
const MCSection *XDataSection;
+ /// StructorOutputOrder - Whether the static ctor/dtor list should be output
+ /// in no particular order, in order of increasing priority or the reverse:
+ /// in order of decreasing priority (the default).
+ Structors::OutputOrder StructorOutputOrder; // Default is reverse order.
+
public:
void InitMCObjectFileInfo(StringRef TT, Reloc::Model RM, CodeModel::Model CM,
MCContext &ctx);
@@ -291,6 +300,10 @@ public:
return EHFrameSection;
}
+ Structors::OutputOrder getStructorOutputOrder() const {
+ return StructorOutputOrder;
+ }
+
private:
enum Environment { IsMachO, IsELF, IsCOFF };
Environment Env;