[llvm] [RemoveDIs] Read/write DbgRecords directly from/to bitcode (PR #83251)

Orlando Cazalet-Hyams via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 03:28:21 PST 2024


================
@@ -6636,10 +6708,21 @@ Error BitcodeReader::materialize(GlobalValue *GV) {
   // Move the bit stream to the saved position of the deferred function body.
   if (Error JumpFailed = Stream.JumpToBit(DFII->second))
     return JumpFailed;
+
+  // Set the debug info mode to "new", forcing a mismatch between
+  // module and function debug modes. This is okay because we'll convert
+  // everything back to the old mode after parsing.
----------------
OCHyams wrote:

Yeah, `convertFromNewDbgValues` doesn't do any checking. It just converts DbgRecords to intrinsics. It doesn't do anything / doesn't care if it sees existing intrinsics.

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


More information about the llvm-commits mailing list