[PATCH] D114201: [LTO] Add a function `LTOCodeGenerator::getMergedModule`

Shilei Tian via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 15:43:53 PST 2021


tianshilei1992 created this revision.
Herald added subscribers: ormris, steven_wu, hiraditya, inglorion.
tianshilei1992 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

It is helpful to access the `MergedModule`.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114201

Files:
  llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h


Index: llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
===================================================================
--- llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
+++ llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h
@@ -193,6 +193,8 @@
   void resetMergedModule() { MergedModule.reset(); }
   void DiagnosticHandler(const DiagnosticInfo &DI);
 
+  Module &getMergedModule() { return *MergedModule; }
+
 private:
   /// Verify the merged module on first call.
   ///


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114201.388341.patch
Type: text/x-patch
Size: 477 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211118/3c13f962/attachment.bin>


More information about the llvm-commits mailing list