[llvm] [DebugInfo][RemoveDIs] Add flag to use "new" debug-info in opt (PR #71937)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 10 08:34:00 PST 2023


================
@@ -438,6 +444,19 @@ int main(int argc, char **argv) {
   initializeReplaceWithVeclibLegacyPass(Registry);
   initializeJMCInstrumenterPass(Registry);
 
+  // RemoveDIs debug-info transition: tests may request that we /try/ to use the
+  // new debug-info format, if it's built in.
+  if (TryUseNewDbgInfoFormat) {
+#ifdef EXPERIMENTAL_DEBUGINFO_ITERATORS
+    // If LLVM was built with support for this, turn the new debug-info format
+    // on.
+    UseNewDbgInfoFormat = true;
+#else
+    // It it wasn't, do nothing.
+    ;
+#endif
+  }
----------------
OCHyams wrote:

Unless you wanted to add prints etc to the false branch, I don't think we need it?

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


More information about the llvm-commits mailing list