================ @@ -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 != nameObj.end(); it++) { + if (*it == FN) { + FN = FN.substr(0, --len); ---------------- DrTodd13 wrote:
@shahidiqbal13 Thanks for the changes. Just one minor point, you don't need the initial "if" to check for empty set anymore. The first time through the loop if it isn't found in the set then it will add it. Also, I don't know how much we need to consider this but sometimes ordering will be reversed and so the filename assigned to a function would be different in your approach based on which function is encountered first. With the hash approach this wouldn't happen. At this point, we need input from regular LLVM devs in terms of how they like to do things. 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