[Lldb-commits] [lldb] r372847 - Revert r372788 "Host: use the platform identifiers from LLVM (NFC)"

Hans Wennborg via lldb-commits lldb-commits at lists.llvm.org
Wed Sep 25 04:55:16 PDT 2019


Author: hans
Date: Wed Sep 25 04:55:16 2019
New Revision: 372847

URL: http://llvm.org/viewvc/llvm-project?rev=372847&view=rev
Log:
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'
  ...

Modified:
    lldb/trunk/source/Host/windows/Host.cpp

Modified: lldb/trunk/source/Host/windows/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/windows/Host.cpp?rev=372847&r1=372846&r2=372847&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Wed Sep 25 04:55:16 2019
@@ -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
   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;




More information about the lldb-commits mailing list