diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2016-09-23 21:43:51 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2016-09-23 21:43:51 +0000 |
commit | 2d3a26ffb98a65553c33935656bf6bc95953f1a4 (patch) | |
tree | c1145932ef83fd851d6c70243f77a7b2d247669b /clang/lib/CodeGen/BackendUtil.cpp | |
parent | 7ec747fe953944b90c2afb00066314927afdd6e6 (diff) | |
download | bcm5719-llvm-2d3a26ffb98a65553c33935656bf6bc95953f1a4.tar.gz bcm5719-llvm-2d3a26ffb98a65553c33935656bf6bc95953f1a4.zip |
Update clang for r282299.
llvm-svn: 282301
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 541e676be20..b3e54cf442f 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -714,20 +714,6 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action, } } -namespace { -// Wrapper prodiving a stream for the ThinLTO backend. -class ThinLTOOutputWrapper : public lto::NativeObjectOutput { - std::unique_ptr<raw_pwrite_stream> OS; - -public: - ThinLTOOutputWrapper(std::unique_ptr<raw_pwrite_stream> OS) - : OS(std::move(OS)) {} - std::unique_ptr<raw_pwrite_stream> getStream() override { - return std::move(OS); - } -}; -} - static void runThinLTOBackend(const CodeGenOptions &CGOpts, Module *M, std::unique_ptr<raw_pwrite_stream> OS) { // If we are performing a ThinLTO importing compile, load the function index @@ -769,12 +755,12 @@ static void runThinLTOBackend(const CodeGenOptions &CGOpts, Module *M, ModuleMap[I.first()] = (*MBOrErr)->getMemBufferRef(); OwnedImports.push_back(std::move(*MBOrErr)); } - auto AddOutput = [&](size_t Task) { - return llvm::make_unique<ThinLTOOutputWrapper>(std::move(OS)); + auto AddStream = [&](size_t Task) { + return llvm::make_unique<lto::NativeObjectStream>(std::move(OS)); }; lto::Config Conf; if (Error E = thinBackend( - Conf, 0, AddOutput, *M, *CombinedIndex, ImportList, + Conf, 0, AddStream, *M, *CombinedIndex, ImportList, ModuleToDefinedGVSummaries[M->getModuleIdentifier()], ModuleMap)) { handleAllErrors(std::move(E), [&](ErrorInfoBase &EIB) { errs() << "Error running ThinLTO backend: " << EIB.message() << '\n'; |