diff options
author | Todd Fiala <todd.fiala@gmail.com> | 2015-10-13 23:41:19 +0000 |
---|---|---|
committer | Todd Fiala <todd.fiala@gmail.com> | 2015-10-13 23:41:19 +0000 |
commit | 7df337f85c78e64c3fb2d36c859212e8d06f7725 (patch) | |
tree | 15a3679c4ff89174f81de59b3e73546575d3e5a8 /lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | |
parent | a59fcbae4ff25ed039728ac66af0fcf625fa22d4 (diff) | |
download | bcm5719-llvm-7df337f85c78e64c3fb2d36c859212e8d06f7725.tar.gz bcm5719-llvm-7df337f85c78e64c3fb2d36c859212e8d06f7725.zip |
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
Diffstat (limited to 'lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp')
-rw-r--r-- | lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp index f9f035878c4..0884a1c8ff2 100644 --- a/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp +++ b/lldb/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp @@ -1605,6 +1605,12 @@ ObjectFileELF::GetSectionHeaderInfo(SectionHeaderColl §ion_headers, } } + // Make any unknown triple components to be unspecified unknowns. + if (arch_spec.GetTriple().getVendor() == llvm::Triple::UnknownVendor) + arch_spec.GetTriple().setVendorName (llvm::StringRef()); + if (arch_spec.GetTriple().getOS() == llvm::Triple::UnknownOS) + arch_spec.GetTriple().setOSName (llvm::StringRef()); + return section_headers.size(); } } |