Emit the ctors in the proper order on ARM/EABI.
Maybe some targets should use this as well.

Patch by Evgeniy Stepanov!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@145781 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
index 18670fe..d60a1f1 100644
--- a/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
+++ b/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
@@ -1291,7 +1291,7 @@
   }
 
   // Emit the function pointers in reverse priority order.
-  switch (MAI->getStructorOutputOrder()) {
+  switch (getObjFileLowering().getStructorOutputOrder()) {
   case Structors::None:
     break;
   case Structors::PriorityOrder: