<div dir="ltr">I am trying to use clang/llvm to generate llvm IR on IOS.<div>but libLLVMContainer.dylib of opengles.framework conflicts with the llvm code I am using, a sample run crash the iOS simulator before anything loaded,</div><div><br></div><div>here is the backtrace:</div><div>
<p class=""><span class=""><b>(lldb) </b></span><span class=""><b>bt all</b></span></p>
<p class=""><span class="">* thread #1: tid = 0xad480, 0x0d534ddb libsystem_pthread.dylib`_pthread_rwlock_check_init + 11, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x0)</span></p>
<p class=""><span class=""> * frame #0: 0x0d534ddb libsystem_pthread.dylib`_pthread_rwlock_check_init + 11</span></p>
<p class=""><span class=""> frame #1: 0x0d534af0 libsystem_pthread.dylib`_pthread_rwlock_lock + 25</span></p>
<p class=""><span class=""> frame #2: 0x0d539fcc libsystem_pthread.dylib`pthread_rwlock_wrlock$UNIX2003 + 23</span></p>
<p class=""><span class=""> frame #3: 0x12443f13 libLLVMContainer.dylib`llvm::sys::RWMutexImpl::writer_acquire() + 19</span></p>
<p class=""><span class=""> frame #4: 0x1239eb12 libLLVMContainer.dylib`llvm::PassRegistry::addRegistrationListener(llvm::PassRegistrationListener*) + 34</span></p>
<p class=""><span class=""> frame #5: 0x1239a67e libLLVMContainer.dylib`llvm::PassNameParser::PassNameParser() + 78</span></p>
<p class=""><span class=""> frame #6: 0x12391ad3 libLLVMContainer.dylib`_GLOBAL__sub_I_LegacyPassManager.cpp + 1299</span></p>
<p class=""><span class=""> frame #7: 0x09c5020f</span></p>
<p class=""><span class=""> frame #8: 0x09c50368</span></p>
<p class=""><span class=""> frame #9: 0x09c4ba01</span></p>
<p class=""><span class=""> frame #10: 0x09c4b994</span></p>
<p class=""><span class=""> frame #11: 0x09c4b994</span></p>
<p class=""><span class=""> frame #12: 0x09c4b994</span></p>
<p class=""><span class=""> frame #13: 0x09c4b994</span></p>
<p class=""><span class=""> frame #14: 0x09c4b994</span></p>
<p class=""><span class=""> frame #15: 0x09c4b994</span></p>
<p class=""><span class=""> frame #16: 0x09c4b994</span></p>
<p class=""><span class=""> frame #17: 0x09c4b994</span></p>
<p class=""><span class=""> frame #18: 0x09c4ad54</span></p>
<p class=""><span class=""> frame #19: 0x09c4ade3</span></p>
<p class=""><span class=""> frame #20: 0x09c40c50</span></p>
<p class=""><span class=""> frame #21: 0x09c442c7</span></p>
<p class=""><span class=""> frame #22: 0x09c401f9</span></p>
<p class=""><span class=""> frame #23: 0x8fe89118 dyld`dyld::useSimulatorDyld(int, macho_header const*, char const*, int, char const**, char const**, char const**, unsigned long*) + 1053</span></p>
<p class=""><span class=""> frame #24: 0x8fe881f2 dyld`dyld::_main(macho_header const*, unsigned long, int, char const**, char const**, char const**, unsigned long*) + 202</span></p>
<p class=""><span class=""> frame #25: 0x8fe84232 dyld`dyldbootstrap::start(macho_header const*, int, char const**, long, macho_header const*, unsigned long*) + 428</span></p>
<p class=""><span class=""> frame #26: 0x8fe84047 dyld`_dyld_start + 71</span></p>
<p class=""><span class=""><b>(lldb) </b></span></p><p class=""><span class=""><b><br></b></span></p><p class="">How to resolve this conflict. any ideas please let me know.</p><p class=""><br></p><p class="">Thanks</p><p class="">Ramakrishna</p></div></div>