[llvm] [RemoveDIs] Print non-intrinsic debug info in textual IR output (PR #79281)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 29 02:49:50 PST 2024


================
@@ -234,6 +238,13 @@ class LLVM_EXTERNAL_VISIBILITY Module {
     IsNewDbgInfoFormat = false;
   }
 
+  void setIsNewDbgInfoFormat(bool NewFlag) {
+    if (NewFlag && !IsNewDbgInfoFormat)
+      convertToNewDbgValues();
+    else if (!NewFlag && IsNewDbgInfoFormat)
+      convertFromNewDbgValues();
----------------
SLTozer wrote:

I think it's important to keep `IsNewDbgInfoFormat = true` in the convert to/from methods - we aren't changing every conversion point to use this new method, and the flag needs to accurately reflect which format we're in at all times.

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


More information about the llvm-commits mailing list