aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lto/LTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
committerOwen Anderson <resistor@mac.com>2009-07-01 21:22:36 +0000
commita148fdd8312c060c65bacf8fe61a6db5b2add6a5 (patch)
tree9e5f714db4af7dddfab061cb0016489f6d114c56 /tools/lto/LTOCodeGenerator.cpp
parenta0619e843be1fcf8fba618ed93207cf5db42cc26 (diff)
downloadexternal_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.zip
external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.gz
external_llvm-a148fdd8312c060c65bacf8fe61a6db5b2add6a5.tar.bz2
Hold the LLVMContext by reference rather than by pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74640 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'tools/lto/LTOCodeGenerator.cpp')
-rw-r--r--tools/lto/LTOCodeGenerator.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/lto/LTOCodeGenerator.cpp b/tools/lto/LTOCodeGenerator.cpp
index 8ae196f..faac33b 100644
--- a/tools/lto/LTOCodeGenerator.cpp
+++ b/tools/lto/LTOCodeGenerator.cpp
@@ -69,8 +69,8 @@ const char* LTOCodeGenerator::getVersionString()
}
-LTOCodeGenerator::LTOCodeGenerator()
- : _context(new LLVMContext()),
+LTOCodeGenerator::LTOCodeGenerator(const LLVMContext& Context)
+ : _context(Context),
_linker("LinkTimeOptimizer", "ld-temp.o", _context), _target(NULL),
_emitDwarfDebugInfo(false), _scopeRestrictionsDone(false),
_codeModel(LTO_CODEGEN_PIC_MODEL_DYNAMIC),