Maintain the old LTO API, by using the global context.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74678 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Owen Anderson
2009-07-02 00:31:14 +00:00
parent 6d8f1263f4
commit 0e7a54672c
6 changed files with 17 additions and 29 deletions

View File

@@ -19,6 +19,7 @@
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Linker.h"
#include "llvm/LLVMContext.h"
#include "llvm/Module.h"
#include "llvm/ModuleProvider.h"
#include "llvm/PassManager.h"
@@ -69,8 +70,8 @@ const char* LTOCodeGenerator::getVersionString()
}
LTOCodeGenerator::LTOCodeGenerator(LLVMContext& Context)
: _context(Context),
LTOCodeGenerator::LTOCodeGenerator()
: _context(getGlobalContext()),
_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
_codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),