summaryrefslogtreecommitdiff
path: root/include/llvm/MC
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2011-09-02 18:07:19 +0000
committerDuncan Sands <baldrick@free.fr>2011-09-02 18:07:19 +0000
commit147272b8a70db7984a6bdfad3b5efabcb794a42e (patch)
tree9af9b3f2b5be4e345c0cb17cb6b36b0566931fdb /include/llvm/MC
parent98f213cd60f21437846ce4075c0fe15d7f09a3fd (diff)
downloadllvm-147272b8a70db7984a6bdfad3b5efabcb794a42e.tar.gz
llvm-147272b8a70db7984a6bdfad3b5efabcb794a42e.tar.bz2
llvm-147272b8a70db7984a6bdfad3b5efabcb794a42e.tar.xz
Darwin wants ctors/dtors to be ordered the other way round to linux.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139015 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/MC')
-rw-r--r--include/llvm/MC/MCAsmInfo.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/MC/MCAsmInfo.h b/include/llvm/MC/MCAsmInfo.h
index 96b68c833d..e2cef7a123 100644
--- a/include/llvm/MC/MCAsmInfo.h
+++ b/include/llvm/MC/MCAsmInfo.h
@@ -36,6 +36,10 @@ namespace llvm {
enum LCOMMType { None, NoAlignment, ByteAlignment };
}
+ namespace Structors {
+ enum OutputOrder { None, PriorityOrder, ReversePriorityOrder };
+ }
+
/// MCAsmInfo - This class is intended to be used as a base class for asm
/// properties and features specific to the target.
class MCAsmInfo {
@@ -68,6 +72,11 @@ namespace llvm {
/// the macho-specific .tbss directive for emitting thread local BSS Symbols
bool HasMachoTBSSDirective; // Default is false.
+ /// 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.
+
/// HasStaticCtorDtorReferenceInStaticMode - True if the compiler should
/// emit a ".reference .constructors_used" or ".reference .destructors_used"
/// directive after the a static ctor/dtor list. This directive is only
@@ -395,6 +404,9 @@ namespace llvm {
//
bool hasMachoZeroFillDirective() const { return HasMachoZeroFillDirective; }
bool hasMachoTBSSDirective() const { return HasMachoTBSSDirective; }
+ Structors::OutputOrder getStructorOutputOrder() const {
+ return StructorOutputOrder;
+ }
bool hasStaticCtorDtorReferenceInStaticMode() const {
return HasStaticCtorDtorReferenceInStaticMode;
}