compiler construction - Binding against LLVM 3.8.4 no getGlobalContext -
i attempting follow https://github.com/lsegal/my_toy_compiler, though has been updated llvm 3.8.0, unable compile using llvm 3.8.4 brew --with-clang --with-lld --with-jit --with-python
. following error, use of undeclared identifier 'getglobalcontext'
.
additionally symbol getglobalcontext
not appear in /usr/local/opt/llvm/include/llvm/ir/llvmcontext.h
or indeed anywhere in /usr/local/opt/llvm/include
directory.
i expect either function has been deprecated recently, (for have not been able find evidence), or not building correctly.
any tips appreciated.
note have seen trouble linking against llvm project including flex , bison , did not resolve particular problem
i encountered same problem llvm 4.0. solution follows.
old:
llvmcontext *llvmcx; llvmcx = &getglobalcontext();
new:
llvmcontext *llvmcx; static llvmcontext myglobalcontext; llvmcx = &myglobalcontext;
Comments
Post a Comment