[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-31 Thread Pavel Labath via Phabricator via lldb-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316987: Invert ArchSpec<->Platform dependency (authored by labath). Changed prior to commit: https://reviews.llvm.org/D39387?vs=120714&id=120957#toc Repository: rL LLVM https://reviews.llvm.org/D393

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 120714. labath added a comment. rename argument to normalized_triple, check that the architecture is not empty. https://reviews.llvm.org/D39387 Files: include/lldb/Core/ArchSpec.h include/lldb/Host/HostInfoBase.h include/lldb/Target/Platform.h packag

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Core/ArchSpec.cpp:890 +bool ArchSpec::ContainsOnlyArch(const llvm::Triple &triple) { + return triple.getOSName().empty() && + triple.getVendorName().empty() && Should you also add `!triple.getArchName().e

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Pavel Labath via Phabricator via lldb-commits
labath updated this revision to Diff 120712. labath added a comment. Address review comments https://reviews.llvm.org/D39387 Files: include/lldb/Core/ArchSpec.h include/lldb/Host/HostInfoBase.h include/lldb/Target/Platform.h packages/Python/lldbsuite/test/source-manager/main.c source/

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Pavel Labath via Phabricator via lldb-commits
labath marked 3 inline comments as done. labath added inline comments. Comment at: include/lldb/Target/Platform.h:524 + //--- + ArchSpec GetAugmentedArchSpec(llvm::StringRef triple); + ztur

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Target/Platform.cpp:986-991 +if (normalized_triple.getVendorName().empty()) + normalized_triple.setVendor(compatible_triple.getVendor()); +if (normalized_triple.getOSName().empty()) + normalized_triple.setOS(comp

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: source/Target/Platform.cpp:986-991 +if (normalized_triple.getVendorName().empty()) + normalized_triple.setVendor(compatible_triple.getVendor()); +if (normalized_triple.getOSName().empty()) + normalized_triple.setOS(comp

Re: [Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Zachary Turner via lldb-commits
On Fri, Oct 27, 2017 at 2:13 PM Jason Molenda wrote: > haven't had a chance to look at the patch yet, but just to comment on one > part from Zach: > > > On Oct 27, 2017, at 2:06 PM, Zachary Turner via Phabricator via > lldb-commits wrote: > > > > > > > > Comment at: source/Targe

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Pavel Labath via Phabricator via lldb-commits
labath added inline comments. Comment at: source/Target/Platform.cpp:986-991 +if (normalized_triple.getVendorName().empty()) + normalized_triple.setVendor(compatible_triple.getVendor()); +if (normalized_triple.getOSName().empty()) + normalized_triple.setOS(compa

Re: [Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Jason Molenda via lldb-commits
haven't had a chance to look at the patch yet, but just to comment on one part from Zach: > On Oct 27, 2017, at 2:06 PM, Zachary Turner via Phabricator via lldb-commits > wrote: > > > > Comment at: source/Target/Platform.cpp:986-991 > +if (normalized_triple.getVendorName(

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Zachary Turner via Phabricator via lldb-commits
zturner added inline comments. Comment at: include/lldb/Host/HostInfoBase.h:85 + //--- + /// If the triple contains not specify the vendor, os, and environment parts, + /// we "augment" these using informa

[Lldb-commits] [PATCH] D39387: Invert ArchSpec<->Platform dependency

2017-10-27 Thread Pavel Labath via Phabricator via lldb-commits
labath created this revision. Herald added subscribers: javed.absar, mgorny. ArchSpec::SetTriple was taking a Platform as an argument, and used it to fill in missing pieces of the specified triple. I invert the dependency by moving this code to other classes. For this purpose, I've created three n