diff options
| author | Sean Silva <chisophugis@gmail.com> | 2016-03-09 20:06:24 +0000 |
|---|---|---|
| committer | Sean Silva <chisophugis@gmail.com> | 2016-03-09 20:06:24 +0000 |
| commit | c43ec673b9b579572af5eb414a335d7d4f2d929f (patch) | |
| tree | 753b44e305482675e5359f97e653893dd8ba7e97 | |
| parent | 67181e3c3aca85232d7b350df23d0f57cae35b6b (diff) | |
| download | bcm5719-llvm-c43ec673b9b579572af5eb414a335d7d4f2d929f.tar.gz bcm5719-llvm-c43ec673b9b579572af5eb414a335d7d4f2d929f.zip | |
Update for Rui's comments on D18006
Somehow I missed them.
llvm-svn: 263057
| -rw-r--r-- | lld/ELF/SymbolTable.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lld/ELF/SymbolTable.cpp b/lld/ELF/SymbolTable.cpp index 0f3f02b870d..9334f213054 100644 --- a/lld/ELF/SymbolTable.cpp +++ b/lld/ELF/SymbolTable.cpp @@ -147,9 +147,11 @@ static void addBitcodeFile(IRMover &Mover, BitcodeFile &F, Mover.move(std::move(M), Keep, [](GlobalValue &, IRMover::ValueAdder) {}); } -static void saveBCFile(std::string Path, Module &M) { +// This is for use when debugging LTO. +static void saveBCFile(Module &M) { std::error_code EC; - raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::F_None); + raw_fd_ostream OS(Config->OutputFile.str() + ".lto.bc", EC, + sys::fs::OpenFlags::F_None); check(EC); WriteBitcodeToFile(&M, OS, /* ShouldPreserveUseListOrder */ true); } @@ -164,7 +166,7 @@ ObjectFile<ELFT> *SymbolTable<ELFT>::createCombinedLtoObject() { for (const std::unique_ptr<BitcodeFile> &F : BitcodeFiles) addBitcodeFile(Mover, *F, Context); if (Config->SaveTemps) - saveBCFile(Config->OutputFile.str() + ".lto.bc", Combined); + saveBCFile(Combined); std::unique_ptr<InputFile> F = codegen(Combined); ObjectFiles.emplace_back(cast<ObjectFile<ELFT>>(F.release())); return &*ObjectFiles.back(); |

