forked from OSchip/llvm-project
Revert r372788 "Host: use the platform identifiers from LLVM (NFC)"
> Use symbolic constants for the platform identifiers rather than replicating them > locally. This broke the build of LLDB on Windows, see http://lab.llvm.org:8011/builders/lldb-x64-windows-ninja/builds/9182 which fails with e.g. E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C2059: syntax error: 'constant' E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(96): error C3805: 'constant': unexpected token, expected either '}' or a ',' E:\build_slave\lldb-x64-windows-ninja\llvm\include\llvm/BinaryFormat/COFF.h(128): error C2059: syntax error: 'constant' ... llvm-svn: 372847
This commit is contained in:
parent
99c8651c7f
commit
4d23bd528c
|
@ -22,7 +22,6 @@
|
|||
#include "lldb/Utility/StreamString.h"
|
||||
#include "lldb/Utility/StructuredData.h"
|
||||
|
||||
#include "llvm/BinaryFormat/COFF.h"
|
||||
#include "llvm/Support/ConvertUTF.h"
|
||||
|
||||
// Windows includes
|
||||
|
@ -53,13 +52,13 @@ bool GetTripleForProcess(const FileSpec &executable, llvm::Triple &triple) {
|
|||
triple.setVendor(llvm::Triple::PC);
|
||||
triple.setOS(llvm::Triple::Win32);
|
||||
triple.setArch(llvm::Triple::UnknownArch);
|
||||
if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_AMD64)
|
||||
if (machineType == 0x8664)
|
||||
triple.setArch(llvm::Triple::x86_64);
|
||||
else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_I386)
|
||||
else if (machineType == 0x14c)
|
||||
triple.setArch(llvm::Triple::x86);
|
||||
else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_ARMNT)
|
||||
else if (machineType == 0x1c4)
|
||||
triple.setArch(llvm::Triple::arm);
|
||||
else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_ARM64)
|
||||
else if (machineType == 0xaa64)
|
||||
triple.setArch(llvm::Triple::aarch64);
|
||||
|
||||
return true;
|
||||
|
|
Loading…
Reference in New Issue