[llvm] 698428e - [Analysis] Remove dead WriteDOTGraphToFile (NFC) (#221413)
via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 5 08:36:42 PDT 2026
Author: Kazu Hirata
Date: 2026-09-05T08:36:37-07:00
New Revision: 698428e5a786b5cb792a0f3f39a3de587c5e00dc
URL: https://github.com/llvm/llvm-project/commit/698428e5a786b5cb792a0f3f39a3de587c5e00dc
DIFF: https://github.com/llvm/llvm-project/commit/698428e5a786b5cb792a0f3f39a3de587c5e00dc.diff
LOG: [Analysis] Remove dead WriteDOTGraphToFile (NFC) (#221413)
The last callers were migrated to DOTGraphTraitsPrinter on May 16, 2022
in commit 7dce9eb6e507d48d0b79bfb408592936d378cc28.
Assisted-by: Antigravity
Added:
Modified:
llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
index 4c9538d8a2cda..8e4e2a3b4b3c6 100644
--- a/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
+++ b/llvm/include/llvm/Analysis/DOTGraphTraitsPass.h
@@ -316,27 +316,6 @@ class DOTGraphTraitsModulePrinterWrapperPass : public ModulePass {
std::string Name;
};
-template <typename GraphT>
-void WriteDOTGraphToFile(Function &F, GraphT &&Graph,
- std::string FileNamePrefix, bool IsSimple) {
- std::string Filename = FileNamePrefix + "." + F.getName().str();
- shortenFileName(Filename);
- Filename = Filename + ".dot";
- std::error_code EC;
-
- errs() << "Writing '" << Filename << "'...";
-
- raw_fd_ostream File(Filename, EC, sys::fs::OF_TextWithCRLF);
- std::string GraphName = DOTGraphTraits<GraphT>::getGraphName(Graph);
- std::string Title = GraphName + " for '" + F.getName().str() + "' function";
-
- if (!EC)
- WriteGraph(File, Graph, IsSimple, Title);
- else
- errs() << " error opening file for writing!";
- errs() << "\n";
-}
-
} // end namespace llvm
#endif
More information about the llvm-commits
mailing list