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