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

Saleem Abdulrasool via lldb-commits lldb-commits at lists.llvm.org
Tue Sep 24 15:55:44 PDT 2019


Author: compnerd
Date: Tue Sep 24 15:55:44 2019
New Revision: 372788

URL: http://llvm.org/viewvc/llvm-project?rev=372788&view=rev
Log:
Host: use the platform identifiers from LLVM (NFC)

Use symbolic constants for the platform identifiers rather than replicating them
locally.

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=372788&r1=372787&r2=372788&view=diff
==============================================================================
--- lldb/trunk/source/Host/windows/Host.cpp (original)
+++ lldb/trunk/source/Host/windows/Host.cpp Tue Sep 24 15:55:44 2019
@@ -22,6 +22,7 @@
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/StructuredData.h"
 
+#include "llvm/BinaryFormat/COFF.h"
 #include "llvm/Support/ConvertUTF.h"
 
 // Windows includes
@@ -52,13 +53,13 @@ bool GetTripleForProcess(const FileSpec
   triple.setVendor(llvm::Triple::PC);
   triple.setOS(llvm::Triple::Win32);
   triple.setArch(llvm::Triple::UnknownArch);
-  if (machineType == 0x8664)
+  if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_AMD64)
     triple.setArch(llvm::Triple::x86_64);
-  else if (machineType == 0x14c)
+  else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_I386)
     triple.setArch(llvm::Triple::x86);
-  else if (machineType == 0x1c4)
+  else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_ARMNT)
     triple.setArch(llvm::Triple::arm);
-  else if (machineType == 0xaa64)
+  else if (machineType == llvm::COFF::IMAGE_FILE_MACHINE_ARM64)
     triple.setArch(llvm::Triple::aarch64);
 
   return true;




More information about the lldb-commits mailing list