[LLVMdev] questions about context

Guoliang Jin jingl1345 at gmail.com
Wed Aug 18 19:41:04 PDT 2010


I am trying to load another bytecode file in one pass.

I checked the opt.cpp, it uses following to load a bytecode file:
   LLVMContext &Context = getGlobalContext();


   SMDiagnostic Err;

   // Load the input module...
   std::auto_ptr<Module> M;
   M.reset(ParseIRFile(InputFilename, Err, Context));

My question is in the runOnModule method where I want to load another 
bytecode file, what context should I use? Is getGlobalContext() still OK?


More information about the llvm-dev mailing list