diff options
Diffstat (limited to 'lldb/source/Core/ArchSpec.cpp')
-rw-r--r-- | lldb/source/Core/ArchSpec.cpp | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/lldb/source/Core/ArchSpec.cpp b/lldb/source/Core/ArchSpec.cpp index e38501c81ed..27335420008 100644 --- a/lldb/source/Core/ArchSpec.cpp +++ b/lldb/source/Core/ArchSpec.cpp @@ -844,9 +844,9 @@ ArchSpec::SetTriple (const char *triple_cstr, Platform *platform) void ArchSpec::MergeFrom(const ArchSpec &other) { - if (GetTriple().getVendor() == llvm::Triple::UnknownVendor && !TripleVendorWasSpecified()) + if (TripleVendorIsUnspecifiedUnknown() && !other.TripleVendorIsUnspecifiedUnknown()) GetTriple().setVendor(other.GetTriple().getVendor()); - if (GetTriple().getOS() == llvm::Triple::UnknownOS && !TripleOSWasSpecified()) + if (TripleOSIsUnspecifiedUnknown() && !other.TripleOSIsUnspecifiedUnknown()) GetTriple().setOS(other.GetTriple().getOS()); if (GetTriple().getArch() == llvm::Triple::UnknownArch) GetTriple().setArch(other.GetTriple().getArch()); @@ -1444,3 +1444,18 @@ ArchSpec::GetStopInfoOverrideCallback () const return StopInfoOverrideCallbackTypeARM; return NULL; } + +void +ArchSpec::DumpTriple(Stream &s) const +{ + const llvm::Triple &triple = GetTriple(); + llvm::StringRef arch_str = triple.getArchName(); + llvm::StringRef vendor_str = triple.getVendorName(); + llvm::StringRef os_str = triple.getOSName(); + + s.Printf("%s-%s-%s", + arch_str.empty() ? "*" : arch_str.str().c_str(), + vendor_str.empty() ? "*" : vendor_str.str().c_str(), + os_str.empty() ? "*" : os_str.str().c_str() + ); +} |