<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">Hi,</span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">I’d like to make sure my understanding of the name mangling in the ORC examples is correct. </span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">In the ORC lazy examples, each function gets IR’ed into its own separate LLVM module, and each module is compiled separately. So, in the name resolver, all functions need to be resolved by their mangled name, as they are linked with external linkage. </span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">I’m still not clear on what exactly performs the name mangling. Say I build an LLVM module that has the following function definition</span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">define double @test(double %x) …</span><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">And then I compile this to object code, where exactly is the name mangling performed, i.e. creating a RuntimeDyld that has a symbol called “_test”?</span><div class=""><br class=""></div><div class=""><br style="font-family: Menlo-Regular; font-size: 11px;" class=""><span style="font-family: Menlo-Regular; font-size: 11px;" class="">thanks</span></div></body></html>