Hi all,<div><br></div><div>I am trying to traverse a dominator tree and have encountered a weird runtime exception:</div><div><br></div><div>Here's my simple code: </div><div><br></div><div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
    virtual bool runOnFunction(Function &F) {</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">      DominatorTree& DT = getAnalysis<DominatorTree>();</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
  <b><font color="#ff0000">    DomTreeNode* rootNode = DT.getRootNode();</font></b></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">      return false.</div>
<div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">}</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">Here's the documentation page:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<a href="http://llvm.org/docs/doxygen/html/classllvm_1_1DominatorTree.html" target="_blank" style="color:rgb(17,85,204)">http://llvm.org/docs/doxygen/html/classllvm_1_1DominatorTree.html</a><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">And here's my runtime exception:</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.800000190734863px;background-color:rgb(255,255,255)">
<div>dyld: lazy symbol binding failed: Symbol not found: __ZN4llvm17DominatorTreeBaseINS_10BasicBlockEE11getRootNodeEv</div><div>  Referenced from: /Users/weibohe/Projects/llvm/llvm/Debug+Asserts/lib/LLVMSLVN.dylib</div><div>
  Expected in: flat namespace</div><div><br></div><div>dyld: Symbol not found: __ZN4llvm17DominatorTreeBaseINS_10BasicBlockEE11getRootNodeEv</div><div>  Referenced from: /Users/weibohe/Projects/llvm/llvm/Debug+Asserts/lib/LLVMSLVN.dylib</div>
<div>  Expected in: flat namespace</div><div><br></div><div>0  opt               0x0000000105f528de llvm::sys::PrintStackTrace(__sFILE*) + 46</div><div>1  opt               0x0000000105f52beb _ZL28PrintStackTraceSignalHandlerPv + 27</div>
<div>2  opt               0x0000000105f52ef9 _ZL13SignalHandleri + 297</div><div>3  libsystem_c.dylib 0x00007fff90d32cfa _sigtramp + 26</div><div>4  libsystem_c.dylib 0xfffffffffffffff8 _sigtramp + 1865208600</div><div>5  libsystem_c.dylib 0x00007fff64a41948 _sigtramp + 3553684584</div>
<div>6  libdyld.dylib     0x00007fff8afe2716 dyld_stub_binder_ + 13</div><div>7  LLVMSLVN.dylib    0x00000001081a8040 void std::__destroy_aux<llvm::PassInfo const**>(llvm::PassInfo const**, llvm::PassInfo const**, std::__true_type) + 19904</div>
<div>8  LLVMSLVN.dylib    0x00000001081998c1 (anonymous namespace)::DVN::runOnFunction(llvm::Function&) + 65</div><div>9  opt               0x0000000105eb27b2 llvm::FPPassManager::runOnFunction(llvm::Function&) + 434</div>
<div>10 opt               0x0000000105eb2a98 llvm::FPPassManager::runOnModule(llvm::Module&) + 104</div><div>11 opt               0x0000000105eb2e9a llvm::MPPassManager::runOnModule(llvm::Module&) + 634</div><div>
12 opt               0x0000000105eb36ae llvm::PassManagerImpl::run(llvm::Module&) + 302</div><div>13 opt               0x0000000105eb3951 llvm::PassManager::run(llvm::Module&) + 33</div><div>14 opt               0x0000000104e4d335 main + 6549</div>
<div>15 opt               0x0000000104e3e434 start + 52</div><div>Stack dump:</div><div>0.<span style="white-space:pre-wrap">     </span>Program arguments: opt -load ../../../Debug+Asserts/lib/LLVMSLVN.dylib -dvn </div><div>1.<span style="white-space:pre-wrap">   </span>Running pass 'Function Pass Manager' on module '<stdin>'.</div>
<div>2.<span style="white-space:pre-wrap">        </span>Running pass 'My test analysis' on function '@main'</div><div><br></div><div><br></div><div>Any idea on why this is happening? Any help or suggestion is appreciated! Thanks in advance.</div>
<div><br></div><div>Best,</div><div>Weibo</div><div><br></div></div></div>