diff options
author | evgeny <eleviant@accesssoftek.com> | 2019-12-18 18:33:15 +0300 |
---|---|---|
committer | evgeny <eleviant@accesssoftek.com> | 2019-12-18 18:33:15 +0300 |
commit | ad364956edb7f06e0064e90e7c37d13b3cccd1cf (patch) | |
tree | 9d180ba44edd7947fdf1a25fb55c3fc70c23216b /llvm/lib/LTO/LTOBackend.cpp | |
parent | 3a779b7dfd8ee2924997dbed7f6c43d7989895f6 (diff) | |
download | llvm-ad364956edb7f06e0064e90e7c37d13b3cccd1cf.zip llvm-ad364956edb7f06e0064e90e7c37d13b3cccd1cf.tar.gz llvm-ad364956edb7f06e0064e90e7c37d13b3cccd1cf.tar.bz2 |
[ThinLTO] Show preserved symbols in DOT files
Differential revision: https://reviews.llvm.org/D71608
Diffstat (limited to 'llvm/lib/LTO/LTOBackend.cpp')
-rw-r--r-- | llvm/lib/LTO/LTOBackend.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/llvm/lib/LTO/LTOBackend.cpp b/llvm/lib/LTO/LTOBackend.cpp index e437b44..4c5302d 100644 --- a/llvm/lib/LTO/LTOBackend.cpp +++ b/llvm/lib/LTO/LTOBackend.cpp @@ -102,23 +102,25 @@ Error Config::addSaveTemps(std::string OutputFileName, setHook("4.opt", PostOptModuleHook); setHook("5.precodegen", PreCodeGenModuleHook); - CombinedIndexHook = [=](const ModuleSummaryIndex &Index) { - std::string Path = OutputFileName + "index.bc"; - std::error_code EC; - raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None); - // Because -save-temps is a debugging feature, we report the error - // directly and exit. - if (EC) - reportOpenError(Path, EC.message()); - WriteIndexToFile(Index, OS); - - Path = OutputFileName + "index.dot"; - raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_None); - if (EC) - reportOpenError(Path, EC.message()); - Index.exportToDot(OSDot); - return true; - }; + CombinedIndexHook = + [=](const ModuleSummaryIndex &Index, + const DenseSet<GlobalValue::GUID> &GUIDPreservedSymbols) { + std::string Path = OutputFileName + "index.bc"; + std::error_code EC; + raw_fd_ostream OS(Path, EC, sys::fs::OpenFlags::OF_None); + // Because -save-temps is a debugging feature, we report the error + // directly and exit. + if (EC) + reportOpenError(Path, EC.message()); + WriteIndexToFile(Index, OS); + + Path = OutputFileName + "index.dot"; + raw_fd_ostream OSDot(Path, EC, sys::fs::OpenFlags::OF_None); + if (EC) + reportOpenError(Path, EC.message()); + Index.exportToDot(OSDot, GUIDPreservedSymbols); + return true; + }; return Error::success(); } |