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

Mingjie Xu via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 9 04:51:17 PDT 2025


================
@@ -118,6 +118,11 @@ static cl::opt<bool>
 #endif
                                 cl::desc(""));
 
+static cl::opt<bool> PreserveBitcodeUseListOrder(
+    "preserve-bc-uselistorder",
+    cl::desc("Preserve use-list order when writing LLVM bitcode."),
+    cl::init(false), cl::Hidden);
----------------
Enna1 wrote:

Thanks.
Updated to use `Opt.getNumOccurences() ? Opt : Default` for `preserve-ll-uselistorder` and `preserve-bc-uselistorder` as suggested.

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


More information about the llvm-commits mailing list