[llvm] [RemoveDIs] Load into new debug info format by default in LLVM (PR #89799)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 25 03:34:38 PDT 2024


================
@@ -26,6 +27,27 @@
 
 using namespace llvm;
 
+extern llvm::cl::opt<bool> UseNewDbgInfoFormat;
+extern cl::opt<cl::boolOrDefault> PreserveInputDbgFormat;
+extern bool WriteNewDbgInfoFormatToBitcode;
+extern cl::opt<bool> WriteNewDbgInfoFormat;
+
+// Backup all of the existing settings that may be modified when
+// PreserveInputDbgFormat=true, so that when the test is finished we return them
+// (and the "preserve" setting) to their original values.
+auto TempSettingChange() {
----------------
OCHyams wrote:

I wonder if this should be shared somewhere? Maybe not necessary for this - depends if there's any common unit test header you can use? Then you could use it in the other tests too rather then manually saving and restoring 
`PreserveInputDbgFormat` etc. YMMV. Please apply `static` and the rename mentioned at the other instance of this function either way.

EDIT: This doesn't matter much if we're going to fix up the tests immediately.

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


More information about the llvm-commits mailing list