diff options
| author | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-27 05:11:44 +0000 |
|---|---|---|
| committer | Mehdi Amini <mehdi.amini@apple.com> | 2016-04-27 05:11:44 +0000 |
| commit | c7b950171d4b5e4e16de5d5c7c86592ed1fb5dac (patch) | |
| tree | 71be02a279c565f30ba4f599ea3f08ae2c7b01b2 /llvm/lib/LTO | |
| parent | d8f24a9c4fe113e2d333a86973cb05b9b2f12ce0 (diff) | |
| download | bcm5719-llvm-c7b950171d4b5e4e16de5d5c7c86592ed1fb5dac.tar.gz bcm5719-llvm-c7b950171d4b5e4e16de5d5c7c86592ed1fb5dac.zip | |
Revert "Support "preserving" the summary information when using setModule() API in LTOCodeGenerator"
This reverts commit r267665.
ASAN shows that there is a use of undefined value.
From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 267668
Diffstat (limited to 'llvm/lib/LTO')
| -rw-r--r-- | llvm/lib/LTO/LTOCodeGenerator.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/lib/LTO/LTOCodeGenerator.cpp b/llvm/lib/LTO/LTOCodeGenerator.cpp index 8497114f64f..01304641598 100644 --- a/llvm/lib/LTO/LTOCodeGenerator.cpp +++ b/llvm/lib/LTO/LTOCodeGenerator.cpp @@ -18,7 +18,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/ADT/StringExtras.h" #include "llvm/Analysis/Passes.h" -#include "llvm/Analysis/ModuleSummaryAnalysis.h" #include "llvm/Analysis/TargetLibraryInfo.h" #include "llvm/Analysis/TargetTransformInfo.h" #include "llvm/Bitcode/ReaderWriter.h" @@ -146,7 +145,6 @@ void LTOCodeGenerator::setModule(std::unique_ptr<LTOModule> Mod) { MergedModule = Mod->takeModule(); TheLinker = make_unique<Linker>(*MergedModule); - MainModuleHasSummary = Mod->isThinLTO(); const std::vector<const char*> &Undefs = Mod->getAsmUndefinedRefs(); for (int I = 0, E = Undefs.size(); I != E; ++I) @@ -211,13 +209,8 @@ bool LTOCodeGenerator::writeMergedModules(const char *Path) { return false; } - std::unique_ptr<ModuleSummaryIndex> Index; - if (MainModuleHasSummary) - Index = ModuleSummaryIndexBuilder(MergedModule.get()).takeIndex(); - // write bitcode to it - WriteBitcodeToFile(MergedModule.get(), Out.os(), ShouldEmbedUselists, - Index.get()); + WriteBitcodeToFile(MergedModule.get(), Out.os(), ShouldEmbedUselists); Out.os().close(); if (Out.os().has_error()) { |

