[Lldb-commits] [lldb] r241569 - Leave OS as unspecified unknown if it isn't specified in the ELF file
Tamas Berghammer
tberghammer at google.com
Tue Jul 7 02:11:59 PDT 2015
Author: tberghammer
Date: Tue Jul 7 04:11:59 2015
New Revision: 241569
URL: http://llvm.org/viewvc/llvm-project?rev=241569&view=rev
Log:
Leave OS as unspecified unknown if it isn't specified in the ELF file
This is the redone of r238623 what was reverted with the refactor
in r239148.
Differential revision: http://reviews.llvm.org/D10957
Modified:
lldb/trunk/source/Core/ArchSpec.cpp
Modified: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=241569&r1=241568&r2=241569&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp Tue Jul 7 04:11:59 2015
@@ -887,20 +887,15 @@ ArchSpec::SetArchitecture (ArchitectureT
}
else if (arch_type == eArchTypeELF)
{
- llvm::Triple::OSType ostype;
switch (os)
{
- case llvm::ELF::ELFOSABI_AIX: ostype = llvm::Triple::OSType::AIX; break;
- case llvm::ELF::ELFOSABI_FREEBSD: ostype = llvm::Triple::OSType::FreeBSD; break;
- case llvm::ELF::ELFOSABI_GNU: ostype = llvm::Triple::OSType::Linux; break;
- case llvm::ELF::ELFOSABI_NETBSD: ostype = llvm::Triple::OSType::NetBSD; break;
- case llvm::ELF::ELFOSABI_OPENBSD: ostype = llvm::Triple::OSType::OpenBSD; break;
- case llvm::ELF::ELFOSABI_SOLARIS: ostype = llvm::Triple::OSType::Solaris; break;
- default:
- ostype = llvm::Triple::OSType::UnknownOS;
+ case llvm::ELF::ELFOSABI_AIX: m_triple.setOS (llvm::Triple::OSType::AIX); break;
+ case llvm::ELF::ELFOSABI_FREEBSD: m_triple.setOS (llvm::Triple::OSType::FreeBSD); break;
+ case llvm::ELF::ELFOSABI_GNU: m_triple.setOS (llvm::Triple::OSType::Linux); break;
+ case llvm::ELF::ELFOSABI_NETBSD: m_triple.setOS (llvm::Triple::OSType::NetBSD); break;
+ case llvm::ELF::ELFOSABI_OPENBSD: m_triple.setOS (llvm::Triple::OSType::OpenBSD); break;
+ case llvm::ELF::ELFOSABI_SOLARIS: m_triple.setOS (llvm::Triple::OSType::Solaris); break;
}
- m_triple.setOS (ostype);
- m_triple.setVendor (llvm::Triple::UnknownVendor);
}
// Fall back onto setting the machine type if the arch by name failed...
if (m_triple.getArch () == llvm::Triple::UnknownArch)
More information about the lldb-commits
mailing list