jasonmolenda wrote: > One idea is to add a new string method on the llvm::Triple class: > > ``` > const std::string strNoObjectFormat() const; > ``` > > And this would check if the object format is in the string in > `llvm::Triple::Data` and if so strip it and return it, else return the > `llvm::Triple::Data` as is. Then we switch LLDB to use the > `llvm::Triple::strNoObjectFormat()` function everywhere.
A `Triple::setObjectFormatNoStringUpdate` or whatever would be another way to approach this. Instead of stripping the object file name out of the triple string when returning it, have a way to specify/change the object format without any update to the triple string. We've been using Triples with ObjectFile set to ELF for ever and never had that show up in the triple string, I don't worry about it leaking in there unintentionally. https://github.com/llvm/llvm-project/pull/144177 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits