libLTO: Allow LTOCodeGenerator to own a context

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221726 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duncan P. N. Exon Smith
2014-11-11 23:03:29 +00:00
parent d54a2bf8e1
commit bce40075a9
2 changed files with 21 additions and 4 deletions

View File

@ -61,6 +61,7 @@ struct LTOCodeGenerator {
static const char *getVersionString();
LTOCodeGenerator();
LTOCodeGenerator(std::unique_ptr<LLVMContext> Context);
~LTOCodeGenerator();
// Merge given module, return true on success.
@ -137,6 +138,8 @@ private:
typedef StringMap<uint8_t> StringSet;
void initialize();
std::unique_ptr<LLVMContext> OwnedContext;
LLVMContext &Context;
Linker IRLinker;
TargetMachine *TargetMach;