<div dir="ltr">Hi,<div><br></div><div>It looks like there's an `extern "C"` declaration in <a href="https://github.com/llvm-mirror/llvm/blob/master/include/llvm-c/Initialization.h#L39" target="_blank">the corresponding header file</a>, which <a href="https://godbolt.org/g/UCZ3qo" target="_blank">appears to be sufficient</a>. All of my attempts to grep for `LLVMInitializeInstCombine` in my build directory are leaving me with unmangled symbols, though I can't say the same for `LLVMInitializeAggressiveInstCombiner`.</div><div><br></div><div>r336736 is an attempt to fix `LLVMInitializeAggressiveInstCombiner`. If I missed something, please let me know. (and if you're still seeing a problem with `LLVMInitializeInstCombine`, more details about your setup/etc. would be appreciated.) :)</div><div><br></div><div>Thanks,</div><div>George</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, Jul 10, 2018 at 7:23 AM Vladimir Vissoultchev via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div class="m_5347361673716981199m_9165445573597499046m_-4717121919768901219m_9148568080431920430m_5931663544671415473m_4365751507415199589m_-2620608744934904056WordSection1"><p class="MsoNormal"><span lang="BG">Hi all,<u></u><u></u></span></p><p class="MsoNormal"><span lang="BG"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="BG">I just found out that there is an <b>extern "C"</b> missing on the <b>LLVMInitializeInstCombine</b> function definition somewhere around this line:<u></u><u></u></span></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><a href="https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstructionCombining.cpp#L3365" target="_blank">https://github.com/llvm-mirror/llvm/blob/master/lib/Transforms/InstCombine/InstructionCombining.cpp#L3365</a><u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="BG">As a result the function name gets mangled in the .lib file and is not accessible from LLVM C API.<u></u><u></u></span></p><p class="MsoNormal"><span lang="BG"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="BG">cheers,<u></u><u></u></span></p><p class="MsoNormal"><span lang="BG"></wqw><u></u><u></u></span></p></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>