summaryrefslogtreecommitdiffstats
path: root/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2017-05-01 20:42:32 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2017-05-01 20:42:32 +0000
commitc15d60b772b1d02134b3d3bdd8e456ed33674279 (patch)
treeacd0d22c65668cb628fb5b0ca7245558fdeabef5 /llvm/lib/LTO/ThinLTOCodeGenerator.cpp
parentba6c9cb5e8b7007009421de0e2be03af22af4daa (diff)
downloadbcm5719-llvm-c15d60b772b1d02134b3d3bdd8e456ed33674279.tar.gz
bcm5719-llvm-c15d60b772b1d02134b3d3bdd8e456ed33674279.zip
Object: Remove ModuleSummaryIndexObjectFile class.
Differential Revision: https://reviews.llvm.org/D32195 llvm-svn: 301832
Diffstat (limited to 'llvm/lib/LTO/ThinLTOCodeGenerator.cpp')
-rw-r--r--llvm/lib/LTO/ThinLTOCodeGenerator.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
index 0d845a26d0c..d2fc892d6a9 100644
--- a/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
+++ b/llvm/lib/LTO/ThinLTOCodeGenerator.cpp
@@ -33,7 +33,6 @@
#include "llvm/Linker/Linker.h"
#include "llvm/MC/SubtargetFeature.h"
#include "llvm/Object/IRObjectFile.h"
-#include "llvm/Object/ModuleSummaryIndexObjectFile.h"
#include "llvm/Support/CachePruning.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Error.h"
@@ -569,21 +568,19 @@ std::unique_ptr<ModuleSummaryIndex> ThinLTOCodeGenerator::linkCombinedIndex() {
std::unique_ptr<ModuleSummaryIndex> CombinedIndex;
uint64_t NextModuleId = 0;
for (auto &ModuleBuffer : Modules) {
- Expected<std::unique_ptr<object::ModuleSummaryIndexObjectFile>> ObjOrErr =
- object::ModuleSummaryIndexObjectFile::create(
- ModuleBuffer.getMemBuffer());
- if (!ObjOrErr) {
+ Expected<std::unique_ptr<ModuleSummaryIndex>> IndexOrErr =
+ getModuleSummaryIndex(ModuleBuffer.getMemBuffer());
+ if (!IndexOrErr) {
// FIXME diagnose
logAllUnhandledErrors(
- ObjOrErr.takeError(), errs(),
- "error: can't create ModuleSummaryIndexObjectFile for buffer: ");
+ IndexOrErr.takeError(), errs(),
+ "error: can't create module summary index for buffer: ");
return nullptr;
}
- auto Index = (*ObjOrErr)->takeIndex();
if (CombinedIndex) {
- CombinedIndex->mergeFrom(std::move(Index), ++NextModuleId);
+ CombinedIndex->mergeFrom(std::move(*IndexOrErr), ++NextModuleId);
} else {
- CombinedIndex = std::move(Index);
+ CombinedIndex = std::move(*IndexOrErr);
}
}
return CombinedIndex;
OpenPOWER on IntegriCloud