<div style="font-family:SimSun,STSong;font-size:large;;"><div><br></div><div><includetail><div style="font:Verdana normal 14px;color:#000;"><div style="position:relative;"><div style="font-family:SimSun,STSong;font-size:large;;"><div><font size="2">Think I've solved this problem, I could directly use <b>unwrap(moduleref)</b> to convert (saw such a usage in LLVM code). </font></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br></div><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br></div></div><div><div style="font:Verdana normal 14px;color:#000;"><div style="FONT-SIZE: 12px;FONT-FAMILY: Arial Narrow;padding:2px 0 2px 0;">------------------ Original ------------------</div><div style="FONT-SIZE: 12px;background:#efefef;padding:8px;"><div id="menu_sender"><b>From: </b> "张雨姗(ZHANG Yushan)-11310380 via llvm-dev"<llvm-dev@lists.llvm.org>;</div><div><b>Date: </b> Tue, Nov 6, 2018 05:49 PM</div><div><b>To: </b> "llvm-dev"<llvm-dev@lists.llvm.org>; <wbr></div><div></div><div><b>Subject: </b> [llvm-dev] How to convert ModuleRef to Module?</div></div><div> </div><div style="position:relative;"><div style="font-family:SimSun,STSong;font-size:large;;"><div><font size="2"><br></font></div><div><font size="2">Hi all,</font></div><div><font size="2"><br></font></div><div><span style="font-size: small;">Currently,  I'm using a Python packge (llvmlite) and I could only get a <b>ModuleRef</b> object from the upper Python layer.</span></div><div><font size="2">To obtain a Module object, I need to <b>convert from ModuleRe</b>f, how could I do this?</font></div><div><font size="2">I've<b> checked the implementation</b> of "core.cpp", but there is no such a function.</font></div><div><font size="2"><br></font></div><div><font size="2">Thanks for any comments or discussions.</font></div><div><font size="2"><br></font></div><div><font size="2">Bests,</font></div><div><font size="2">Yushan</font></div><div><br></div><div><div style="color:#909090;font-family:Arial Narrow;font-size:12px"><br><br><br><br></div></div><div></div></div></div></div></div></div></div></div><!--<![endif]--></includetail></div></div>