diff --git a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h b/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h --- a/llvm/include/llvm/LTO/legacy/LTOCodeGenerator.h +++ b/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. ///