diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-14 19:11:32 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2018-02-14 19:11:32 +0000 |
commit | 6a86e25d90303dd84f179cbe07db9c08eb8161eb (patch) | |
tree | 4ae81941bb37548c3242991b87afe00a87583d76 /llvm/lib/CodeGen/ParallelCG.cpp | |
parent | 6d9cf8aa9d7cad2070f228ed00217ec3c5037d80 (diff) | |
download | llvm-6a86e25d90303dd84f179cbe07db9c08eb8161eb.zip llvm-6a86e25d90303dd84f179cbe07db9c08eb8161eb.tar.gz llvm-6a86e25d90303dd84f179cbe07db9c08eb8161eb.tar.bz2 |
Pass a reference to a module to the bitcode writer.
This simplifies most callers as they are already using references or
std::unique_ptr.
llvm-svn: 325155
Diffstat (limited to 'llvm/lib/CodeGen/ParallelCG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/ParallelCG.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/ParallelCG.cpp b/llvm/lib/CodeGen/ParallelCG.cpp index ff8680a..4624b22 100644 --- a/llvm/lib/CodeGen/ParallelCG.cpp +++ b/llvm/lib/CodeGen/ParallelCG.cpp @@ -44,7 +44,7 @@ std::unique_ptr<Module> llvm::splitCodeGen( if (OSs.size() == 1) { if (!BCOSs.empty()) - WriteBitcodeToFile(M.get(), *BCOSs[0]); + WriteBitcodeToFile(*M, *BCOSs[0]); codegen(M.get(), *OSs[0], TMFactory, FileType); return M; } @@ -66,7 +66,7 @@ std::unique_ptr<Module> llvm::splitCodeGen( // FIXME: Provide a more direct way to do this in LLVM. SmallString<0> BC; raw_svector_ostream BCOS(BC); - WriteBitcodeToFile(MPart.get(), BCOS); + WriteBitcodeToFile(*MPart, BCOS); if (!BCOSs.empty()) { BCOSs[ThreadCount]->write(BC.begin(), BC.size()); |