summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2015-12-04 02:42:28 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2015-12-04 02:42:28 +0000
commit7b8a24e5bb0cd0e87c63016dba7a397ea7db2572 (patch)
tree234221774c450d68d2892d593f96fe8afe75ed64 /llvm/lib
parente52502c45eec110638334b40e8549c7c694763cf (diff)
downloadbcm5719-llvm-7b8a24e5bb0cd0e87c63016dba7a397ea7db2572.tar.gz
bcm5719-llvm-7b8a24e5bb0cd0e87c63016dba7a397ea7db2572.zip
Move a call to getGlobalContext out of lib/LTO.
llvm-svn: 254696
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/LTO/LTOCodeGenerator.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp
index 468ec24e3a0..b0dae74c13d 100644
--- a/llvm/lib/LTO/LTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/LTOCodeGenerator.cpp
@@ -64,20 +64,13 @@ const char* LTOCodeGenerator::getVersionString() {
#endif
}
-LTOCodeGenerator::LTOCodeGenerator()
- : Context(getGlobalContext()),
+LTOCodeGenerator::LTOCodeGenerator(LLVMContext &Context)
+ : Context(Context),
MergedModule(new Module("ld-temp.o", Context)),
IRLinker(new Linker(*MergedModule)) {
initializeLTOPasses();
}
-LTOCodeGenerator::LTOCodeGenerator(std::unique_ptr<LLVMContext> Context)
- : OwnedContext(std::move(Context)), Context(*OwnedContext),
- MergedModule(new Module("ld-temp.o", *OwnedContext)),
- IRLinker(new Linker(*MergedModule)) {
- initializeLTOPasses();
-}
-
LTOCodeGenerator::~LTOCodeGenerator() {}
// Initialize LTO passes. Please keep this function in sync with
OpenPOWER on IntegriCloud