================
@@ -58,11 +58,13 @@ struct PassPluginLibraryInfo {
   void (*RegisterPassBuilderCallbacks)(PassBuilder &) = nullptr;
 
   /// Callback called before running the back-end passes on the module. The
-  /// callback can generate code itself by writing the expected output to OS 
and
-  /// returning true to prevent the default pipeline and further plugin
-  /// callbacks from running.
+  /// callback can generate code itself by writing the expected output to OS
+  /// and returning true to prevent the default pipeline and further plugin
+  /// callbacks from running. DwoOS behaves the same way with respect to the
+  /// return value. It is null unless the .dwo contents go to a separate file.
   bool (*PreCodeGenCallback)(Module &, TargetMachine &, CodeGenFileType,
-                             raw_pwrite_stream &OS) = nullptr;
+                             raw_pwrite_stream &OS,
+                             raw_pwrite_stream *DwoOS) = nullptr;
----------------
weliveindetail wrote:

Thanks for the sketch! Forwarding from a plugin gives us that compile-time 
check too, and lit also runs it end-to-end. This illustrates how the hook is 
used in plugins that run an LLVM-based pipeline of their own. That's a common 
use-case I'd like to cover.

https://github.com/llvm/llvm-project/pull/241314
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to