From 7df337f85c78e64c3fb2d36c859212e8d06f7725 Mon Sep 17 00:00:00 2001 From: Todd Fiala Date: Tue, 13 Oct 2015 23:41:19 +0000 Subject: ArchSpec: fix unintentional promotion of unspecified unknowns to specified unknowns * ArchSpec::MergeFrom() would erroneously promote an unspecified unknown to a specified unknown when both the ArchSpec and the merged in ArchSpec were both unspecified unknowns. This no longer happens, which fixes issues with global module cache lookup in some situations. * Added ArchSpec::DumpTriple(Stream&) that now properly prints unspecified unknowns as '*' and specified unknows as 'unknown'. This makes it trivial to tell the difference between the two. Converted printing code over ot using DumpTriple() rather than building from scratch. * Fixed up a couple places that were not guaranteeing that an unspecified unknown was recorded as such. llvm-svn: 250253 --- lldb/source/Host/linux/HostInfoLinux.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lldb/source/Host/linux/HostInfoLinux.cpp') diff --git a/lldb/source/Host/linux/HostInfoLinux.cpp b/lldb/source/Host/linux/HostInfoLinux.cpp index 3a3023b1343..4732a2a571b 100644 --- a/lldb/source/Host/linux/HostInfoLinux.cpp +++ b/lldb/source/Host/linux/HostInfoLinux.cpp @@ -271,12 +271,12 @@ HostInfoLinux::ComputeHostArchitectureSupport(ArchSpec &arch_32, ArchSpec &arch_ { arch_32.SetDistributionId(distribution_id); if (arch_32.GetTriple().getVendor() == llvm::Triple::UnknownVendor) - arch_32.GetTriple().setVendorName(""); + arch_32.GetTriple().setVendorName(llvm::StringRef()); } if (arch_64.IsValid()) { arch_64.SetDistributionId(distribution_id); if (arch_64.GetTriple().getVendor() == llvm::Triple::UnknownVendor) - arch_64.GetTriple().setVendorName(""); + arch_64.GetTriple().setVendorName(llvm::StringRef()); } } -- cgit v1.2.3