Fix supported architectures on PlatformWindows.

i386, i486, i486sx, and i686 are all indistinguishable as far as
PE/COFF files are concerned.  This patch adds support for all of
these architectures to PlatformWindows.

Differential Revision: http://reviews.llvm.org/D4658

llvm-svn: 214092
This commit is contained in:
Zachary Turner
2014-07-28 16:44:49 +00:00
parent 3b2065f017
commit ad587ae4ca
5 changed files with 80 additions and 23 deletions

View File

@@ -129,7 +129,11 @@ ObjectFilePECOFF::GetModuleSpecifications (const lldb_private::FileSpec& file,
if (ParseCOFFHeader(data, &offset, coff_header))
{
ArchSpec spec;
spec.SetArchitecture(eArchTypeCOFF, coff_header.machine, LLDB_INVALID_CPUTYPE);
llvm::Triple::ArchType archType = llvm::Triple::UnknownArch;
if (coff_header.machine == MachineAmd64)
spec.SetTriple("x86_64-pc-windows");
else if (coff_header.machine == MachineX86)
spec.SetTriple("i386-pc-windows");
specs.Append(ModuleSpec(file, spec));
}
}