From 4c8fabc7de30e17ef116b8f413f3a973c29cb56c Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Wed, 22 Feb 2017 16:10:21 +0100 Subject: llvm: stop using global context It was marked as deprecated long time ago and finally removed in LLVM 3.9. Remove all uses of getGlobalContext and create our own context. Propagate it all over the code then. [v2] use ctx, not C as name Signed-off-by: Jiri Slaby --- lib/Module/ModuleUtil.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/Module/ModuleUtil.cpp') diff --git a/lib/Module/ModuleUtil.cpp b/lib/Module/ModuleUtil.cpp index 2cd41c89..94a37e08 100644 --- a/lib/Module/ModuleUtil.cpp +++ b/lib/Module/ModuleUtil.cpp @@ -248,7 +248,8 @@ static bool linkBCA(object::Archive* archive, Module* composite, std::string& er if (buff) { // FIXME: Maybe load bitcode file lazily? Then if we need to link, materialise the module - Result = ParseBitcodeFile(buff.get(), getGlobalContext(), &errorMessage); + Result = ParseBitcodeFile(buff.get(), composite->getContext(), + &errorMessage); if(!Result) { @@ -378,7 +379,7 @@ Module *klee::linkWithLibrary(Module *module, sys::fs::file_magic magic = sys::fs::identify_magic(Buffer->getBuffer()); - LLVMContext &Context = getGlobalContext(); + LLVMContext &Context = module->getContext(); std::string ErrorMessage; if (magic == sys::fs::file_magic::bitcode) { -- cgit 1.4.1