[lld] [llvm] [clang-tools-extra] [lldb] [compiler-rt] [libunwind] [libc] [mlir] [clang] [libcxxabi] [libcxx] [flang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 edited https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [libc] [libunwind] [clang-tools-extra] [flang] [libcxxabi] [lldb] [mlir] [libcxx] [compiler-rt] [lld] [clang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 requested changes to this pull request. I like the idea of that new function but I don't think it does what you intended. https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[mlir] [lldb] [libc] [libcxxabi] [flang] [compiler-rt] [lld] [clang-tools-extra] [libcxx] [clang] [llvm] [libunwind] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
@@ -83,10 +85,29 @@ struct DOTGraphTraitsViewer StringRef Name; }; +static void shortenFileName(std::string &FN, unsigned char len = 250) { + + FN = FN.substr(0, len); + if (nameObj.empty()) +nameObj.push_back(FN); + + else { +for (auto it = nameObj.begin(); it !=

[libunwind] [compiler-rt] [libcxx] [mlir] [lldb] [lld] [flang] [clang-tools-extra] [libc] [libcxxabi] [llvm] [clang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-18 Thread Todd A. Anderson via cfe-commits
@@ -17,6 +17,8 @@ #include "llvm/Support/FileSystem.h" #include "llvm/Support/GraphWriter.h" +static std::vector nameObj; DrTodd13 wrote: I don't know if there is some LLVM code approach that would dictate what to do here. We can have some kind of a data st

[clang-tools-extra] [libc] [llvm] [clang] [libunwind] [lld] [libcxx] [lldb] [compiler-rt] [libcxxabi] [mlir] [flang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-20 Thread Todd A. Anderson via cfe-commits
@@ -83,10 +85,29 @@ struct DOTGraphTraitsViewer StringRef Name; }; +static void shortenFileName(std::string &FN, unsigned char len = 250) { + + FN = FN.substr(0, len); + if (nameObj.empty()) +nameObj.push_back(FN); + + else { +for (auto it = nameObj.begin(); it !=

[flang] [libc] [libunwind] [libcxx] [clang-tools-extra] [libcxxabi] [lld] [llvm] [lldb] [clang] [compiler-rt] [mlir] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 requested changes to this pull request. I don't think these changes as they are solve the problem. https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[clang] [libunwind] [lldb] [lld] [flang] [compiler-rt] [clang-tools-extra] [llvm] [libc] [libcxx] [mlir] [libcxxabi] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
@@ -94,7 +96,7 @@ void printGraphForFunction(Function &F, GraphT Graph, StringRef Name, raw_fd_ostream File(Filename, EC, sys::fs::OF_TextWithCRLF); DrTodd13 wrote: If Filename is too long, then EC here will already contain an error code. https://github.com/

[libunwind] [libcxxabi] [clang] [mlir] [compiler-rt] [clang-tools-extra] [libcxx] [flang] [lldb] [llvm] [libc] [lld] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
https://github.com/DrTodd13 edited https://github.com/llvm/llvm-project/pull/72654 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [llvm] [libunwind] [libcxx] [libcxxabi] [libc] [clang] [lldb] [compiler-rt] [lld] [clang-tools-extra] [flang] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
@@ -310,7 +312,7 @@ void WriteDOTGraphToFile(Function &F, GraphT &&Graph, std::string GraphName = DOTGraphTraits::getGraphName(Graph); std::string Title = GraphName + " for '" + F.getName().str() + "' function"; - if (!EC) + if (!EC && (Filename.length() <= MAX_FILENAME_

[llvm] [clang-tools-extra] [libcxx] [flang] [clang] [libc] [mlir] [lldb] [compiler-rt] [libunwind] [lld] [libcxxabi] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
@@ -94,7 +96,7 @@ void printGraphForFunction(Function &F, GraphT Graph, StringRef Name, raw_fd_ostream File(Filename, EC, sys::fs::OF_TextWithCRLF); std::string GraphName = DOTGraphTraits::getGraphName(Graph); - if (!EC) + if (!EC && (Filename.length() <= MAX_FILENAME_L

[clang] [libc] [libcxxabi] [mlir] [llvm] [compiler-rt] [lldb] [flang] [lld] [libcxx] [clang-tools-extra] [libunwind] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
@@ -94,7 +96,7 @@ void printGraphForFunction(Function &F, GraphT Graph, StringRef Name, raw_fd_ostream File(Filename, EC, sys::fs::OF_TextWithCRLF); DrTodd13 wrote: I needed to work around this bug when I found it so in my local version I did a (Name.str() +

[compiler-rt] [mlir] [libc] [libcxxabi] [clang-tools-extra] [libunwind] [libcxx] [clang] [lld] [lldb] [flang] [llvm] PR#72453 : Exceeding maximum file name length (PR #72654)

2023-11-17 Thread Todd A. Anderson via cfe-commits
@@ -280,7 +282,7 @@ class DOTGraphTraitsModulePrinterWrapperPass : public ModulePass { raw_fd_ostream File(Filename, EC, sys::fs::OF_TextWithCRLF); std::string Title = DOTGraphTraits::getGraphName(Graph); -if (!EC) +if (!EC && (Filename.length() <= MAX_FILENAM