Doing old tutorials, I often see getGlobalContext() used. However, in LLVM 3.9.1, this function can no longer be found.
What should I replace these calls with for equivalent behaviour?
Doing old tutorials, I often see getGlobalContext() used. However, in LLVM 3.9.1, this function can no longer be found.
What should I replace these calls with for equivalent behaviour?
I found this review very useful: https://reviews.llvm.org/rL266379
It shows the tutorials being changed in llvm/docs to match the new API. They are replacing getGlobalContext()
with code to allocate an LLVMContext
to match the usage (static if it's being used with a static IRBuilder
, for example).
So basically, make your own LLVMContext
instead of using getGlobalContext()
.