[llvm] [RemoveDIs] Add flag to preserve the debug info format of input IR (PR #87379)

Stephen Tozer via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 4 13:27:53 PDT 2024


================
@@ -36,7 +36,8 @@ namespace llvm {
   /// for upgrading, and returns true if it requires upgrading. It may return
   /// null in NewFn if the all calls to the original intrinsic function
   /// should be transformed to non-function-call instructions.
-  bool UpgradeIntrinsicFunction(Function *F, Function *&NewFn);
+  bool UpgradeIntrinsicFunction(Function *F, Function *&NewFn,
+                                bool CanUpgradeDebugIntrinsicsToRecords = true);
----------------
SLTozer wrote:

Nope, this part is used in this patch in `BitcodeReader.cpp:3789`, to avoid upgrading debug intrinsics to records specifically when we have the preserve flag enabled.

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


More information about the llvm-commits mailing list