aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-02 00:31:14 +0000
committerOwen Anderson <resistor@mac.com>2009-07-02 00:31:14 +0000
commit0e7a54672cf346ee7c4aae10822c74f7c74f3fed (patch)
tree69c161120ebf5ea3e8f5d7a20a26ca90cc78b193 /tools/lto/LTOCodeGenerator.cpp
parent6d8f1263f40e6b8fc2cd5cce3dfd9ce99fe09226 (diff)
downloadexternal_llvm-0e7a54672cf346ee7c4aae10822c74f7c74f3fed.zip
external_llvm-0e7a54672cf346ee7c4aae10822c74f7c74f3fed.tar.gz
external_llvm-0e7a54672cf346ee7c4aae10822c74f7c74f3fed.tar.bz2
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
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 6f5e6bc..1a21132 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -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),