[llvm] Move the preserve-{bc,ll}-uselistorder options out of individual tools, make them global defaults for AsmWriter and BitcodeWriter (PR #160079)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 05:34:11 PDT 2025


================
@@ -2944,7 +2951,11 @@ AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac,
 AssemblyWriter::AssemblyWriter(formatted_raw_ostream &o, SlotTracker &Mac,
                                const ModuleSummaryIndex *Index, bool IsForDebug)
     : Out(o), TheIndex(Index), Machine(Mac), TypePrinter(/*Module=*/nullptr),
-      IsForDebug(IsForDebug), ShouldPreserveUseListOrder(false) {}
+      IsForDebug(IsForDebug),
+      ShouldPreserveUseListOrder(
+          PreserveAssemblyUseListOrder.getNumOccurrences()
+              ? PreserveAssemblyUseListOrder
+              : false) {}
----------------
nikic wrote:

This can directly use PreserveAssemblyUseListOrder, as false is already the default.

https://github.com/llvm/llvm-project/pull/160079


More information about the llvm-commits mailing list