[Lldb-commits] [lldb] r318048 - Move ArchSpec to the Utility module

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 13 08:16:34 PST 2017


Author: labath
Date: Mon Nov 13 08:16:33 2017
New Revision: 318048

URL: http://llvm.org/viewvc/llvm-project?rev=318048&view=rev
Log:
Move ArchSpec to the Utility module

The rationale here is that ArchSpec is used throughout the codebase,
including in places which should not depend on the rest of the code in
the Core module.

This commit touches many files, but most of it is just renaming of
 #include lines. In a couple of cases, I removed the #include ArchSpec
line altogether, as the file was not using it. In one or two places,
this necessitated adding other #includes like lldb-private-defines.h.

Added:
    lldb/trunk/include/lldb/Utility/ArchSpec.h
      - copied, changed from r318046, lldb/trunk/include/lldb/Core/ArchSpec.h
    lldb/trunk/source/Utility/ArchSpec.cpp
      - copied, changed from r318046, lldb/trunk/source/Core/ArchSpec.cpp
    lldb/trunk/unittests/Utility/ArchSpecTest.cpp
      - copied, changed from r318046, lldb/trunk/unittests/Core/ArchSpecTest.cpp
Removed:
    lldb/trunk/include/lldb/Core/ArchSpec.h
    lldb/trunk/source/Core/ArchSpec.cpp
    lldb/trunk/unittests/Core/ArchSpecTest.cpp
Modified:
    lldb/trunk/include/lldb/Core/Disassembler.h
    lldb/trunk/include/lldb/Core/EmulateInstruction.h
    lldb/trunk/include/lldb/Core/Module.h
    lldb/trunk/include/lldb/Core/ModuleSpec.h
    lldb/trunk/include/lldb/Expression/ExpressionParser.h
    lldb/trunk/include/lldb/Host/HostInfoBase.h
    lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h
    lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
    lldb/trunk/include/lldb/Interpreter/OptionValueArch.h
    lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
    lldb/trunk/include/lldb/Target/Platform.h
    lldb/trunk/include/lldb/Target/Process.h
    lldb/trunk/include/lldb/Target/ProcessInfo.h
    lldb/trunk/include/lldb/Target/Target.h
    lldb/trunk/include/lldb/Target/UnwindAssembly.h
    lldb/trunk/source/API/SBInstruction.cpp
    lldb/trunk/source/API/SBPlatform.cpp
    lldb/trunk/source/API/SBTarget.cpp
    lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
    lldb/trunk/source/Commands/CommandObjectDisassemble.h
    lldb/trunk/source/Commands/CommandObjectFrame.h
    lldb/trunk/source/Commands/CommandObjectTarget.h
    lldb/trunk/source/Core/Address.cpp
    lldb/trunk/source/Core/AddressRange.cpp
    lldb/trunk/source/Core/CMakeLists.txt
    lldb/trunk/source/Core/FormatEntity.cpp
    lldb/trunk/source/Core/ModuleList.cpp
    lldb/trunk/source/Core/Value.cpp
    lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
    lldb/trunk/source/Core/ValueObjectMemory.cpp
    lldb/trunk/source/Core/ValueObjectVariable.cpp
    lldb/trunk/source/Host/common/Host.cpp
    lldb/trunk/source/Host/common/HostInfoBase.cpp
    lldb/trunk/source/Host/common/Symbols.cpp
    lldb/trunk/source/Interpreter/CommandObject.cpp
    lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
    lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp
    lldb/trunk/source/Plugins/Architecture/Arm/CMakeLists.txt
    lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
    lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
    lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
    lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
    lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
    lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
    lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
    lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
    lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
    lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
    lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
    lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
    lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
    lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
    lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
    lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
    lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
    lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h
    lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
    lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
    lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
    lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h
    lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
    lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
    lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h
    lldb/trunk/source/Symbol/ClangASTContext.cpp
    lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
    lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
    lldb/trunk/source/Symbol/JavaASTContext.cpp
    lldb/trunk/source/Target/ThreadPlanTracer.cpp
    lldb/trunk/source/Target/UnixSignals.cpp
    lldb/trunk/source/Utility/CMakeLists.txt
    lldb/trunk/unittests/Core/CMakeLists.txt
    lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp
    lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
    lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp
    lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
    lldb/trunk/unittests/Utility/CMakeLists.txt
    lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
    lldb/trunk/unittests/tools/lldb-server/tests/TestClient.h

Removed: lldb/trunk/include/lldb/Core/ArchSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ArchSpec.h?rev=318047&view=auto
==============================================================================
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ArchSpec.h (removed)
@@ -1,629 +0,0 @@
-//===-- ArchSpec.h ----------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef liblldb_ArchSpec_h_
-#define liblldb_ArchSpec_h_
-
-#if defined(__cplusplus)
-
-#include "lldb/Utility/ConstString.h"
-#include "lldb/lldb-enumerations.h"
-#include "lldb/lldb-private-enumerations.h"
-#include "lldb/lldb-forward.h"
-#include "llvm/ADT/StringRef.h" // for StringRef
-#include "llvm/ADT/Triple.h"
-
-#include <string> // for string
-
-#include <stddef.h> // for size_t
-#include <stdint.h> // for uint32_t
-
-namespace lldb_private {
-
-//----------------------------------------------------------------------
-/// @class ArchSpec ArchSpec.h "lldb/Core/ArchSpec.h"
-/// @brief An architecture specification class.
-///
-/// A class designed to be created from a cpu type and subtype, a
-/// string representation, or an llvm::Triple.  Keeping all of the
-/// conversions of strings to architecture enumeration values confined
-/// to this class allows new architecture support to be added easily.
-//----------------------------------------------------------------------
-class ArchSpec {
-public:
-  enum MIPSSubType {
-    eMIPSSubType_unknown,
-    eMIPSSubType_mips32,
-    eMIPSSubType_mips32r2,
-    eMIPSSubType_mips32r6,
-    eMIPSSubType_mips32el,
-    eMIPSSubType_mips32r2el,
-    eMIPSSubType_mips32r6el,
-    eMIPSSubType_mips64,
-    eMIPSSubType_mips64r2,
-    eMIPSSubType_mips64r6,
-    eMIPSSubType_mips64el,
-    eMIPSSubType_mips64r2el,
-    eMIPSSubType_mips64r6el,
-  };
-
-  // Masks for the ases word of an ABI flags structure.
-  enum MIPSASE {
-    eMIPSAse_dsp = 0x00000001,       // DSP ASE
-    eMIPSAse_dspr2 = 0x00000002,     // DSP R2 ASE
-    eMIPSAse_eva = 0x00000004,       // Enhanced VA Scheme
-    eMIPSAse_mcu = 0x00000008,       // MCU (MicroController) ASE
-    eMIPSAse_mdmx = 0x00000010,      // MDMX ASE
-    eMIPSAse_mips3d = 0x00000020,    // MIPS-3D ASE
-    eMIPSAse_mt = 0x00000040,        // MT ASE
-    eMIPSAse_smartmips = 0x00000080, // SmartMIPS ASE
-    eMIPSAse_virt = 0x00000100,      // VZ ASE
-    eMIPSAse_msa = 0x00000200,       // MSA ASE
-    eMIPSAse_mips16 = 0x00000400,    // MIPS16 ASE
-    eMIPSAse_micromips = 0x00000800, // MICROMIPS ASE
-    eMIPSAse_xpa = 0x00001000,       // XPA ASE
-    eMIPSAse_mask = 0x00001fff,
-    eMIPSABI_O32 = 0x00002000,
-    eMIPSABI_N32 = 0x00004000,
-    eMIPSABI_N64 = 0x00008000,
-    eMIPSABI_O64 = 0x00020000,
-    eMIPSABI_EABI32 = 0x00040000,
-    eMIPSABI_EABI64 = 0x00080000,
-    eMIPSABI_mask = 0x000ff000
-  };
-
-  // MIPS Floating point ABI Values
-  enum MIPS_ABI_FP {
-    eMIPS_ABI_FP_ANY = 0x00000000,
-    eMIPS_ABI_FP_DOUBLE = 0x00100000, // hard float / -mdouble-float
-    eMIPS_ABI_FP_SINGLE = 0x00200000, // hard float / -msingle-float
-    eMIPS_ABI_FP_SOFT = 0x00300000,   // soft float
-    eMIPS_ABI_FP_OLD_64 = 0x00400000, // -mips32r2 -mfp64
-    eMIPS_ABI_FP_XX = 0x00500000,     // -mfpxx
-    eMIPS_ABI_FP_64 = 0x00600000,     // -mips32r2 -mfp64
-    eMIPS_ABI_FP_64A = 0x00700000,    // -mips32r2 -mfp64 -mno-odd-spreg
-    eMIPS_ABI_FP_mask = 0x00700000
-  };
-
-  // ARM specific e_flags
-  enum ARMeflags {
-    eARM_abi_soft_float = 0x00000200,
-    eARM_abi_hard_float = 0x00000400
-  };
-
-  enum Core {
-    eCore_arm_generic,
-    eCore_arm_armv4,
-    eCore_arm_armv4t,
-    eCore_arm_armv5,
-    eCore_arm_armv5e,
-    eCore_arm_armv5t,
-    eCore_arm_armv6,
-    eCore_arm_armv6m,
-    eCore_arm_armv7,
-    eCore_arm_armv7f,
-    eCore_arm_armv7s,
-    eCore_arm_armv7k,
-    eCore_arm_armv7m,
-    eCore_arm_armv7em,
-    eCore_arm_xscale,
-
-    eCore_thumb,
-    eCore_thumbv4t,
-    eCore_thumbv5,
-    eCore_thumbv5e,
-    eCore_thumbv6,
-    eCore_thumbv6m,
-    eCore_thumbv7,
-    eCore_thumbv7s,
-    eCore_thumbv7k,
-    eCore_thumbv7f,
-    eCore_thumbv7m,
-    eCore_thumbv7em,
-    eCore_arm_arm64,
-    eCore_arm_armv8,
-    eCore_arm_aarch64,
-
-    eCore_mips32,
-    eCore_mips32r2,
-    eCore_mips32r3,
-    eCore_mips32r5,
-    eCore_mips32r6,
-    eCore_mips32el,
-    eCore_mips32r2el,
-    eCore_mips32r3el,
-    eCore_mips32r5el,
-    eCore_mips32r6el,
-    eCore_mips64,
-    eCore_mips64r2,
-    eCore_mips64r3,
-    eCore_mips64r5,
-    eCore_mips64r6,
-    eCore_mips64el,
-    eCore_mips64r2el,
-    eCore_mips64r3el,
-    eCore_mips64r5el,
-    eCore_mips64r6el,
-
-    eCore_ppc_generic,
-    eCore_ppc_ppc601,
-    eCore_ppc_ppc602,
-    eCore_ppc_ppc603,
-    eCore_ppc_ppc603e,
-    eCore_ppc_ppc603ev,
-    eCore_ppc_ppc604,
-    eCore_ppc_ppc604e,
-    eCore_ppc_ppc620,
-    eCore_ppc_ppc750,
-    eCore_ppc_ppc7400,
-    eCore_ppc_ppc7450,
-    eCore_ppc_ppc970,
-
-    eCore_ppc64le_generic,
-    eCore_ppc64_generic,
-    eCore_ppc64_ppc970_64,
-
-    eCore_s390x_generic,
-
-    eCore_sparc_generic,
-
-    eCore_sparc9_generic,
-
-    eCore_x86_32_i386,
-    eCore_x86_32_i486,
-    eCore_x86_32_i486sx,
-    eCore_x86_32_i686,
-
-    eCore_x86_64_x86_64,
-    eCore_x86_64_x86_64h, // Haswell enabled x86_64
-    eCore_hexagon_generic,
-    eCore_hexagon_hexagonv4,
-    eCore_hexagon_hexagonv5,
-
-    eCore_uknownMach32,
-    eCore_uknownMach64,
-
-    eCore_kalimba3,
-    eCore_kalimba4,
-    eCore_kalimba5,
-
-    kNumCores,
-
-    kCore_invalid,
-    // The following constants are used for wildcard matching only
-    kCore_any,
-    kCore_arm_any,
-    kCore_ppc_any,
-    kCore_ppc64_any,
-    kCore_x86_32_any,
-    kCore_x86_64_any,
-    kCore_hexagon_any,
-
-    kCore_arm_first = eCore_arm_generic,
-    kCore_arm_last = eCore_arm_xscale,
-
-    kCore_thumb_first = eCore_thumb,
-    kCore_thumb_last = eCore_thumbv7em,
-
-    kCore_ppc_first = eCore_ppc_generic,
-    kCore_ppc_last = eCore_ppc_ppc970,
-
-    kCore_ppc64_first = eCore_ppc64_generic,
-    kCore_ppc64_last = eCore_ppc64_ppc970_64,
-
-    kCore_x86_32_first = eCore_x86_32_i386,
-    kCore_x86_32_last = eCore_x86_32_i686,
-
-    kCore_x86_64_first = eCore_x86_64_x86_64,
-    kCore_x86_64_last = eCore_x86_64_x86_64h,
-
-    kCore_hexagon_first = eCore_hexagon_generic,
-    kCore_hexagon_last = eCore_hexagon_hexagonv5,
-
-    kCore_kalimba_first = eCore_kalimba3,
-    kCore_kalimba_last = eCore_kalimba5,
-
-    kCore_mips32_first = eCore_mips32,
-    kCore_mips32_last = eCore_mips32r6,
-
-    kCore_mips32el_first = eCore_mips32el,
-    kCore_mips32el_last = eCore_mips32r6el,
-
-    kCore_mips64_first = eCore_mips64,
-    kCore_mips64_last = eCore_mips64r6,
-
-    kCore_mips64el_first = eCore_mips64el,
-    kCore_mips64el_last = eCore_mips64r6el,
-
-    kCore_mips_first = eCore_mips32,
-    kCore_mips_last = eCore_mips64r6el
-
-  };
-
-  //------------------------------------------------------------------
-  /// Default constructor.
-  ///
-  /// Default constructor that initializes the object with invalid
-  /// cpu type and subtype values.
-  //------------------------------------------------------------------
-  ArchSpec();
-
-  //------------------------------------------------------------------
-  /// Constructor over triple.
-  ///
-  /// Constructs an ArchSpec with properties consistent with the given
-  /// Triple.
-  //------------------------------------------------------------------
-  explicit ArchSpec(const llvm::Triple &triple);
-  explicit ArchSpec(const char *triple_cstr);
-  explicit ArchSpec(llvm::StringRef triple_str);
-  //------------------------------------------------------------------
-  /// Constructor over architecture name.
-  ///
-  /// Constructs an ArchSpec with properties consistent with the given
-  /// object type and architecture name.
-  //------------------------------------------------------------------
-  explicit ArchSpec(ArchitectureType arch_type, uint32_t cpu_type,
-                    uint32_t cpu_subtype);
-
-  //------------------------------------------------------------------
-  /// Destructor.
-  //------------------------------------------------------------------
-  ~ArchSpec();
-
-  //------------------------------------------------------------------
-  /// Assignment operator.
-  ///
-  /// @param[in] rhs another ArchSpec object to copy.
-  ///
-  /// @return A const reference to this object.
-  //------------------------------------------------------------------
-  const ArchSpec &operator=(const ArchSpec &rhs);
-
-  //---------------------------------------------------------------------------
-  /// Returns true if the OS, vendor and environment fields of the triple are
-  /// unset. The triple is expected to be normalized (llvm::Triple::normalize).
-  //---------------------------------------------------------------------------
-  static bool ContainsOnlyArch(const llvm::Triple &normalized_triple);
-
-  static size_t AutoComplete(llvm::StringRef name, StringList &matches);
-
-  //------------------------------------------------------------------
-  /// Returns a static string representing the current architecture.
-  ///
-  /// @return A static string correcponding to the current
-  ///         architecture.
-  //------------------------------------------------------------------
-  const char *GetArchitectureName() const;
-
-  //-----------------------------------------------------------------
-  /// if MIPS architecture return true.
-  ///
-  ///  @return a boolean value.
-  //-----------------------------------------------------------------
-  bool IsMIPS() const;
-
-  //------------------------------------------------------------------
-  /// Returns a string representing current architecture as a target CPU
-  /// for tools like compiler, disassembler etc.
-  ///
-  /// @return A string representing target CPU for the current
-  ///         architecture.
-  //------------------------------------------------------------------
-  std::string GetClangTargetCPU() const;
-
-  //------------------------------------------------------------------
-  /// Return a string representing target application ABI.
-  ///
-  /// @return A string representing target application ABI.
-  //------------------------------------------------------------------
-  std::string GetTargetABI() const;
-
-  //------------------------------------------------------------------
-  /// Clears the object state.
-  ///
-  /// Clears the object state back to a default invalid state.
-  //------------------------------------------------------------------
-  void Clear();
-
-  //------------------------------------------------------------------
-  /// Returns the size in bytes of an address of the current
-  /// architecture.
-  ///
-  /// @return The byte size of an address of the current architecture.
-  //------------------------------------------------------------------
-  uint32_t GetAddressByteSize() const;
-
-  //------------------------------------------------------------------
-  /// Returns a machine family for the current architecture.
-  ///
-  /// @return An LLVM arch type.
-  //------------------------------------------------------------------
-  llvm::Triple::ArchType GetMachine() const;
-
-  //------------------------------------------------------------------
-  /// Returns the distribution id of the architecture.
-  ///
-  /// This will be something like "ubuntu", "fedora", etc. on Linux.
-  ///
-  /// @return A ConstString ref containing the distribution id,
-  ///         potentially empty.
-  //------------------------------------------------------------------
-  const ConstString &GetDistributionId() const;
-
-  //------------------------------------------------------------------
-  /// Set the distribution id of the architecture.
-  ///
-  /// This will be something like "ubuntu", "fedora", etc. on Linux.
-  /// This should be the same value returned by
-  /// HostInfo::GetDistributionId ().
-  ///------------------------------------------------------------------
-  void SetDistributionId(const char *distribution_id);
-
-  //------------------------------------------------------------------
-  /// Tests if this ArchSpec is valid.
-  ///
-  /// @return True if the current architecture is valid, false
-  ///         otherwise.
-  //------------------------------------------------------------------
-  bool IsValid() const {
-    return m_core >= eCore_arm_generic && m_core < kNumCores;
-  }
-
-  bool TripleVendorWasSpecified() const {
-    return !m_triple.getVendorName().empty();
-  }
-
-  bool TripleVendorIsUnspecifiedUnknown() const {
-    return m_triple.getVendor() == llvm::Triple::UnknownVendor &&
-           m_triple.getVendorName().empty();
-  }
-
-  bool TripleOSWasSpecified() const { return !m_triple.getOSName().empty(); }
-
-  bool TripleEnvironmentWasSpecified() const {
-    return !m_triple.getEnvironmentName().empty();
-  }
-
-  bool TripleOSIsUnspecifiedUnknown() const {
-    return m_triple.getOS() == llvm::Triple::UnknownOS &&
-           m_triple.getOSName().empty();
-  }
-
-  //------------------------------------------------------------------
-  /// Merges fields from another ArchSpec into this ArchSpec.
-  ///
-  /// This will use the supplied ArchSpec to fill in any fields of
-  /// the triple in this ArchSpec which were unspecified.  This can
-  /// be used to refine a generic ArchSpec with a more specific one.
-  /// For example, if this ArchSpec's triple is something like
-  /// i386-unknown-unknown-unknown, and we have a triple which is
-  /// x64-pc-windows-msvc, then merging that triple into this one
-  /// will result in the triple i386-pc-windows-msvc.
-  ///
-  //------------------------------------------------------------------
-  void MergeFrom(const ArchSpec &other);
-
-  //------------------------------------------------------------------
-  /// Change the architecture object type, CPU type and OS type.
-  ///
-  /// @param[in] arch_type The object type of this ArchSpec.
-  ///
-  /// @param[in] cpu The required CPU type.
-  ///
-  /// @param[in] os The optional OS type
-  /// The default value of 0 was chosen to from the ELF spec value
-  /// ELFOSABI_NONE.  ELF is the only one using this parameter.  If another
-  /// format uses this parameter and 0 does not work, use a value over
-  /// 255 because in the ELF header this is value is only a byte.
-  ///
-  /// @return True if the object, and CPU were successfully set.
-  ///
-  /// As a side effect, the vendor value is usually set to unknown.
-  /// The exections are
-  ///   aarch64-apple-ios
-  ///   arm-apple-ios
-  ///   thumb-apple-ios
-  ///   x86-apple-
-  ///   x86_64-apple-
-  ///
-  /// As a side effect, the os value is usually set to unknown
-  /// The exceptions are
-  ///   *-*-aix
-  ///   aarch64-apple-ios
-  ///   arm-apple-ios
-  ///   thumb-apple-ios
-  ///   powerpc-apple-darwin
-  ///   *-*-freebsd
-  ///   *-*-linux
-  ///   *-*-netbsd
-  ///   *-*-openbsd
-  ///   *-*-solaris
-  //------------------------------------------------------------------
-  bool SetArchitecture(ArchitectureType arch_type, uint32_t cpu, uint32_t sub,
-                       uint32_t os = 0);
-
-  //------------------------------------------------------------------
-  /// Returns the byte order for the architecture specification.
-  ///
-  /// @return The endian enumeration for the current endianness of
-  ///     the architecture specification
-  //------------------------------------------------------------------
-  lldb::ByteOrder GetByteOrder() const;
-
-  //------------------------------------------------------------------
-  /// Sets this ArchSpec's byte order.
-  ///
-  /// In the common case there is no need to call this method as the
-  /// byte order can almost always be determined by the architecture.
-  /// However, many CPU's are bi-endian (ARM, Alpha, PowerPC, etc)
-  /// and the default/assumed byte order may be incorrect.
-  //------------------------------------------------------------------
-  void SetByteOrder(lldb::ByteOrder byte_order) { m_byte_order = byte_order; }
-
-  uint32_t GetMinimumOpcodeByteSize() const;
-
-  uint32_t GetMaximumOpcodeByteSize() const;
-
-  Core GetCore() const { return m_core; }
-
-  uint32_t GetMachOCPUType() const;
-
-  uint32_t GetMachOCPUSubType() const;
-
-  //------------------------------------------------------------------
-  /// Architecture data byte width accessor
-  ///
-  /// @return the size in 8-bit (host) bytes of a minimum addressable
-  /// unit from the Architecture's data bus
-  //------------------------------------------------------------------
-  uint32_t GetDataByteSize() const;
-
-  //------------------------------------------------------------------
-  /// Architecture code byte width accessor
-  ///
-  /// @return the size in 8-bit (host) bytes of a minimum addressable
-  /// unit from the Architecture's code bus
-  //------------------------------------------------------------------
-  uint32_t GetCodeByteSize() const;
-
-  //------------------------------------------------------------------
-  /// Architecture tripple accessor.
-  ///
-  /// @return A triple describing this ArchSpec.
-  //------------------------------------------------------------------
-  llvm::Triple &GetTriple() { return m_triple; }
-
-  //------------------------------------------------------------------
-  /// Architecture tripple accessor.
-  ///
-  /// @return A triple describing this ArchSpec.
-  //------------------------------------------------------------------
-  const llvm::Triple &GetTriple() const { return m_triple; }
-
-  void DumpTriple(Stream &s) const;
-
-  //------------------------------------------------------------------
-  /// Architecture tripple setter.
-  ///
-  /// Configures this ArchSpec according to the given triple.  If the
-  /// triple has unknown components in all of the vendor, OS, and
-  /// the optional environment field (i.e. "i386-unknown-unknown")
-  /// then default values are taken from the host.  Architecture and
-  /// environment components are used to further resolve the CPU type
-  /// and subtype, endian characteristics, etc.
-  ///
-  /// @return A triple describing this ArchSpec.
-  //------------------------------------------------------------------
-  bool SetTriple(const llvm::Triple &triple);
-
-  bool SetTriple(llvm::StringRef triple_str);
-
-  //------------------------------------------------------------------
-  /// Returns the default endianness of the architecture.
-  ///
-  /// @return The endian enumeration for the default endianness of
-  ///         the architecture.
-  //------------------------------------------------------------------
-  lldb::ByteOrder GetDefaultEndian() const;
-
-  //------------------------------------------------------------------
-  /// Returns true if 'char' is a signed type by defualt in the
-  /// architecture false otherwise
-  ///
-  /// @return True if 'char' is a signed type by default on the
-  ///         architecture and false otherwise.
-  //------------------------------------------------------------------
-  bool CharIsSignedByDefault() const;
-
-  //------------------------------------------------------------------
-  /// Compare an ArchSpec to another ArchSpec, requiring an exact cpu
-  /// type match between them.
-  /// e.g. armv7s is not an exact match with armv7 - this would return false
-  ///
-  /// @return true if the two ArchSpecs match.
-  //------------------------------------------------------------------
-  bool IsExactMatch(const ArchSpec &rhs) const;
-
-  //------------------------------------------------------------------
-  /// Compare an ArchSpec to another ArchSpec, requiring a compatible
-  /// cpu type match between them.
-  /// e.g. armv7s is compatible with armv7 - this method would return true
-  ///
-  /// @return true if the two ArchSpecs are compatible
-  //------------------------------------------------------------------
-  bool IsCompatibleMatch(const ArchSpec &rhs) const;
-
-  bool IsFullySpecifiedTriple() const;
-
-  void PiecewiseTripleCompare(const ArchSpec &other, bool &arch_different,
-                              bool &vendor_different, bool &os_different,
-                              bool &os_version_different, bool &env_different) const;
-
-  //------------------------------------------------------------------
-  /// Detect whether this architecture uses thumb code exclusively
-  ///
-  /// Some embedded ARM chips (e.g. the ARM Cortex M0-7 line) can
-  /// only execute the Thumb instructions, never Arm.  We should normally
-  /// pick up arm/thumbness from their the processor status bits (cpsr/xpsr)
-  /// or hints on each function - but when doing bare-boards low level
-  /// debugging (especially common with these embedded processors), we may
-  /// not have those things easily accessible.
-  ///
-  /// @return true if this is an arm ArchSpec which can only execute Thumb
-  ///         instructions
-  //------------------------------------------------------------------
-  bool IsAlwaysThumbInstructions() const;
-
-  uint32_t GetFlags() const { return m_flags; }
-
-  void SetFlags(uint32_t flags) { m_flags = flags; }
-
-  void SetFlags(std::string elf_abi);
-
-protected:
-  bool IsEqualTo(const ArchSpec &rhs, bool exact_match) const;
-  void UpdateCore();
-
-  llvm::Triple m_triple;
-  Core m_core = kCore_invalid;
-  lldb::ByteOrder m_byte_order = lldb::eByteOrderInvalid;
-
-  // Additional arch flags which we cannot get from triple and core
-  // For MIPS these are application specific extensions like
-  // micromips, mips16 etc.
-  uint32_t m_flags = 0;
-
-  ConstString m_distribution_id;
-
-  // Called when m_def or m_entry are changed.  Fills in all remaining
-  // members with default values.
-  void CoreUpdated(bool update_triple);
-};
-
-//------------------------------------------------------------------
-/// @fn bool operator< (const ArchSpec& lhs, const ArchSpec& rhs)
-/// @brief Less than operator.
-///
-/// Tests two ArchSpec objects to see if \a lhs is less than \a
-/// rhs.
-///
-/// @param[in] lhs The Left Hand Side ArchSpec object to compare.
-/// @param[in] rhs The Left Hand Side ArchSpec object to compare.
-///
-/// @return true if \a lhs is less than \a rhs
-//------------------------------------------------------------------
-bool operator<(const ArchSpec &lhs, const ArchSpec &rhs);
-
-bool ParseMachCPUDashSubtypeTriple(llvm::StringRef triple_str, ArchSpec &arch);
-
-} // namespace lldb_private
-
-#endif // #if defined(__cplusplus)
-#endif // #ifndef liblldb_ArchSpec_h_

Modified: lldb/trunk/include/lldb/Core/Disassembler.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Disassembler.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Disassembler.h (original)
+++ lldb/trunk/include/lldb/Core/Disassembler.h Mon Nov 13 08:16:33 2017
@@ -11,7 +11,6 @@
 #define liblldb_Disassembler_h_
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/EmulateInstruction.h"
 #include "lldb/Core/FormatEntity.h" // for FormatEntity
 #include "lldb/Core/Opcode.h"
@@ -19,7 +18,8 @@
 #include "lldb/Interpreter/OptionValue.h"
 #include "lldb/Symbol/LineEntry.h"
 #include "lldb/Target/ExecutionContext.h" // for ExecutionContext
-#include "lldb/Utility/ConstString.h"     // for ConstString
+#include "lldb/Utility/ArchSpec.h"
+#include "lldb/Utility/ConstString.h" // for ConstString
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/lldb-defines.h"      // for DISALLOW_COPY_AND_ASSIGN
 #include "lldb/lldb-enumerations.h" // for AddressClass, AddressClass...

Modified: lldb/trunk/include/lldb/Core/EmulateInstruction.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/EmulateInstruction.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/EmulateInstruction.h (original)
+++ lldb/trunk/include/lldb/Core/EmulateInstruction.h Mon Nov 13 08:16:33 2017
@@ -12,11 +12,10 @@
 
 #include <string>
 
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Core/Address.h" // for Address
 #include "lldb/Core/Opcode.h"
 #include "lldb/Core/PluginInterface.h"
-
-#include "lldb/Core/Address.h"              // for Address
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/lldb-defines.h"              // for DISALLOW_COPY_AND_ASSIGN
 #include "lldb/lldb-enumerations.h"         // for RegisterKind, ByteOrder
 #include "lldb/lldb-private-enumerations.h" // for InstructionType

Modified: lldb/trunk/include/lldb/Core/Module.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/Module.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/Module.h (original)
+++ lldb/trunk/include/lldb/Core/Module.h Mon Nov 13 08:16:33 2017
@@ -10,12 +10,12 @@
 #ifndef liblldb_Module_h_
 #define liblldb_Module_h_
 
-#include "lldb/Core/Address.h" // for Address
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Core/Address.h"    // for Address
 #include "lldb/Core/ModuleSpec.h" // for ModuleSpec
 #include "lldb/Symbol/SymbolContextScope.h"
 #include "lldb/Symbol/TypeSystem.h"
 #include "lldb/Target/PathMappingList.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h" // for ConstString
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Status.h" // for Status

Modified: lldb/trunk/include/lldb/Core/ModuleSpec.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Core/ModuleSpec.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ModuleSpec.h (original)
+++ lldb/trunk/include/lldb/Core/ModuleSpec.h Mon Nov 13 08:16:33 2017
@@ -11,8 +11,8 @@
 #define liblldb_ModuleSpec_h_
 
 // Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Target/PathMappingList.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/UUID.h"

Modified: lldb/trunk/include/lldb/Expression/ExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Expression/ExpressionParser.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Expression/ExpressionParser.h (original)
+++ lldb/trunk/include/lldb/Expression/ExpressionParser.h Mon Nov 13 08:16:33 2017
@@ -11,6 +11,7 @@
 #define liblldb_ExpressionParser_h_
 
 #include "lldb/Utility/Status.h"
+#include "lldb/lldb-private-enumerations.h"
 #include "lldb/lldb-public.h"
 
 namespace lldb_private {

Modified: lldb/trunk/include/lldb/Host/HostInfoBase.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/HostInfoBase.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/HostInfoBase.h (original)
+++ lldb/trunk/include/lldb/Host/HostInfoBase.h Mon Nov 13 08:16:33 2017
@@ -10,7 +10,7 @@
 #ifndef lldb_Host_HostInfoBase_h_
 #define lldb_Host_HostInfoBase_h_
 
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/lldb-enumerations.h"
 

Modified: lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h (original)
+++ lldb/trunk/include/lldb/Host/common/NativeProcessProtocol.h Mon Nov 13 08:16:33 2017
@@ -13,9 +13,9 @@
 #include "NativeBreakpointList.h"
 #include "NativeThreadProtocol.h"
 #include "NativeWatchpointList.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/MainLoop.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/TraceOptions.h"
 #include "lldb/lldb-private-forward.h"

Modified: lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionGroupArchitecture.h Mon Nov 13 08:16:33 2017
@@ -10,12 +10,8 @@
 #ifndef liblldb_OptionGroupArchitecture_h_
 #define liblldb_OptionGroupArchitecture_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/ArchSpec.h"
 
 namespace lldb_private {
 

Modified: lldb/trunk/include/lldb/Interpreter/OptionValueArch.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Interpreter/OptionValueArch.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Interpreter/OptionValueArch.h (original)
+++ lldb/trunk/include/lldb/Interpreter/OptionValueArch.h Mon Nov 13 08:16:33 2017
@@ -10,12 +10,8 @@
 #ifndef liblldb_OptionValueArch_h_
 #define liblldb_OptionValueArch_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/OptionValue.h"
+#include "lldb/Utility/ArchSpec.h"
 
 namespace lldb_private {
 

Modified: lldb/trunk/include/lldb/Symbol/FuncUnwinders.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Symbol/FuncUnwinders.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Symbol/FuncUnwinders.h (original)
+++ lldb/trunk/include/lldb/Symbol/FuncUnwinders.h Mon Nov 13 08:16:33 2017
@@ -1,13 +1,11 @@
 #ifndef liblldb_FuncUnwinders_h
 #define liblldb_FuncUnwinders_h
 
+#include "lldb/Core/AddressRange.h"
+#include "lldb/lldb-private-enumerations.h"
 #include <mutex>
 #include <vector>
 
-#include "lldb/Core/AddressRange.h"
-#include "lldb/Core/AddressRange.h"
-#include "lldb/Core/ArchSpec.h"
-
 namespace lldb_private {
 
 class UnwindTable;

Modified: lldb/trunk/include/lldb/Target/Platform.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Platform.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Platform.h (original)
+++ lldb/trunk/include/lldb/Target/Platform.h Mon Nov 13 08:16:33 2017
@@ -21,10 +21,10 @@
 
 // Other libraries and framework includes
 // Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginInterface.h"
 #include "lldb/Core/UserSettingsController.h"
 #include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/lldb-private-forward.h"

Modified: lldb/trunk/include/lldb/Target/Process.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Process.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Process.h (original)
+++ lldb/trunk/include/lldb/Target/Process.h Mon Nov 13 08:16:33 2017
@@ -27,7 +27,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Breakpoint/BreakpointSiteList.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/Communication.h"
 #include "lldb/Core/Event.h"
@@ -46,6 +45,7 @@
 #include "lldb/Target/ProcessLaunchInfo.h"
 #include "lldb/Target/QueueList.h"
 #include "lldb/Target/ThreadList.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/NameMatches.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/StructuredData.h"

Modified: lldb/trunk/include/lldb/Target/ProcessInfo.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/ProcessInfo.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/ProcessInfo.h (original)
+++ lldb/trunk/include/lldb/Target/ProcessInfo.h Mon Nov 13 08:16:33 2017
@@ -11,8 +11,8 @@
 #define liblldb_ProcessInfo_h_
 
 // LLDB headers
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/Args.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 
 namespace lldb_private {

Modified: lldb/trunk/include/lldb/Target/Target.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/Target.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/Target.h (original)
+++ lldb/trunk/include/lldb/Target/Target.h Mon Nov 13 08:16:33 2017
@@ -23,7 +23,6 @@
 #include "lldb/Breakpoint/BreakpointList.h"
 #include "lldb/Breakpoint/BreakpointName.h"
 #include "lldb/Breakpoint/WatchpointList.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Architecture.h"
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/Disassembler.h"
@@ -35,6 +34,7 @@
 #include "lldb/Target/PathMappingList.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
 #include "lldb/Target/SectionLoadHistory.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Timeout.h"
 #include "lldb/lldb-public.h"
 

Modified: lldb/trunk/include/lldb/Target/UnwindAssembly.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Target/UnwindAssembly.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Target/UnwindAssembly.h (original)
+++ lldb/trunk/include/lldb/Target/UnwindAssembly.h Mon Nov 13 08:16:33 2017
@@ -10,8 +10,8 @@
 #ifndef utility_UnwindAssembly_h_
 #define utility_UnwindAssembly_h_
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginInterface.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/lldb-private.h"
 
 namespace lldb_private {

Copied: lldb/trunk/include/lldb/Utility/ArchSpec.h (from r318046, lldb/trunk/include/lldb/Core/ArchSpec.h)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/Utility/ArchSpec.h?p2=lldb/trunk/include/lldb/Utility/ArchSpec.h&p1=lldb/trunk/include/lldb/Core/ArchSpec.h&r1=318046&r2=318048&rev=318048&view=diff
==============================================================================
--- lldb/trunk/include/lldb/Core/ArchSpec.h (original)
+++ lldb/trunk/include/lldb/Utility/ArchSpec.h Mon Nov 13 08:16:33 2017
@@ -7,22 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef liblldb_ArchSpec_h_
-#define liblldb_ArchSpec_h_
-
-#if defined(__cplusplus)
+#ifndef LLDB_UTILITY_ARCHSPEC_H
+#define LLDB_UTILITY_ARCHSPEC_H
 
 #include "lldb/Utility/ConstString.h"
 #include "lldb/lldb-enumerations.h"
-#include "lldb/lldb-private-enumerations.h"
 #include "lldb/lldb-forward.h"
+#include "lldb/lldb-private-enumerations.h"
 #include "llvm/ADT/StringRef.h" // for StringRef
 #include "llvm/ADT/Triple.h"
-
-#include <string> // for string
-
-#include <stddef.h> // for size_t
-#include <stdint.h> // for uint32_t
+#include <cstddef> // for size_t
+#include <cstdint> // for uint32_t
+#include <string>  // for string
 
 namespace lldb_private {
 
@@ -564,7 +560,8 @@ public:
 
   void PiecewiseTripleCompare(const ArchSpec &other, bool &arch_different,
                               bool &vendor_different, bool &os_different,
-                              bool &os_version_different, bool &env_different) const;
+                              bool &os_version_different,
+                              bool &env_different) const;
 
   //------------------------------------------------------------------
   /// Detect whether this architecture uses thumb code exclusively
@@ -625,5 +622,4 @@ bool ParseMachCPUDashSubtypeTriple(llvm:
 
 } // namespace lldb_private
 
-#endif // #if defined(__cplusplus)
-#endif // #ifndef liblldb_ArchSpec_h_
+#endif // #ifndef LLDB_UTILITY_ARCHSPEC_H

Modified: lldb/trunk/source/API/SBInstruction.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBInstruction.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/API/SBInstruction.cpp (original)
+++ lldb/trunk/source/API/SBInstruction.cpp Mon Nov 13 08:16:33 2017
@@ -14,8 +14,6 @@
 #include "lldb/API/SBInstruction.h"
 #include "lldb/API/SBStream.h"
 #include "lldb/API/SBTarget.h"
-
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/EmulateInstruction.h"
 #include "lldb/Core/Module.h"
@@ -24,6 +22,7 @@
 #include "lldb/Target/ExecutionContext.h"
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 

Modified: lldb/trunk/source/API/SBPlatform.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBPlatform.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/API/SBPlatform.cpp (original)
+++ lldb/trunk/source/API/SBPlatform.cpp Mon Nov 13 08:16:33 2017
@@ -12,11 +12,11 @@
 #include "lldb/API/SBFileSpec.h"
 #include "lldb/API/SBLaunchInfo.h"
 #include "lldb/API/SBUnixSignals.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/File.h"
 #include "lldb/Interpreter/Args.h"
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Status.h"
 
 #include "llvm/Support/FileSystem.h"

Modified: lldb/trunk/source/API/SBTarget.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBTarget.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/API/SBTarget.cpp (original)
+++ lldb/trunk/source/API/SBTarget.cpp Mon Nov 13 08:16:33 2017
@@ -31,7 +31,6 @@
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressResolver.h"
 #include "lldb/Core/AddressResolverName.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"
@@ -58,6 +57,7 @@
 #include "lldb/Target/StackFrame.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/TargetList.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/RegularExpression.h"

Modified: lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp (original)
+++ lldb/trunk/source/Breakpoint/BreakpointLocationList.cpp Mon Nov 13 08:16:33 2017
@@ -15,11 +15,11 @@
 
 #include "lldb/Breakpoint/Breakpoint.h"
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/Commands/CommandObjectDisassemble.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectDisassemble.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectDisassemble.h (original)
+++ lldb/trunk/source/Commands/CommandObjectDisassemble.h Mon Nov 13 08:16:33 2017
@@ -10,13 +10,9 @@
 #ifndef liblldb_CommandObjectDisassemble_h_
 #define liblldb_CommandObjectDisassemble_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObject.h"
 #include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/ArchSpec.h"
 
 namespace lldb_private {
 

Modified: lldb/trunk/source/Commands/CommandObjectFrame.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectFrame.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectFrame.h (original)
+++ lldb/trunk/source/Commands/CommandObjectFrame.h Mon Nov 13 08:16:33 2017
@@ -10,11 +10,6 @@
 #ifndef liblldb_CommandObjectFrame_h_
 #define liblldb_CommandObjectFrame_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 #include "lldb/Interpreter/Options.h"
 

Modified: lldb/trunk/source/Commands/CommandObjectTarget.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Commands/CommandObjectTarget.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Commands/CommandObjectTarget.h (original)
+++ lldb/trunk/source/Commands/CommandObjectTarget.h Mon Nov 13 08:16:33 2017
@@ -10,11 +10,6 @@
 #ifndef liblldb_CommandObjectTarget_h_
 #define liblldb_CommandObjectTarget_h_
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/CommandObjectMultiword.h"
 #include "lldb/Interpreter/Options.h"
 

Modified: lldb/trunk/source/Core/Address.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Address.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/Address.cpp (original)
+++ lldb/trunk/source/Core/Address.cpp Mon Nov 13 08:16:33 2017
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/Address.h"
-
-#include "lldb/Core/ArchSpec.h" // for ArchSpec
 #include "lldb/Core/DumpDataExtractor.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h" // for ModuleList

Modified: lldb/trunk/source/Core/AddressRange.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/AddressRange.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/AddressRange.cpp (original)
+++ lldb/trunk/source/Core/AddressRange.cpp Mon Nov 13 08:16:33 2017
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/AddressRange.h"
-#include "lldb/Core/ArchSpec.h" // for ArchSpec
 #include "lldb/Core/Module.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Utility/ConstString.h" // for ConstString

Removed: lldb/trunk/source/Core/ArchSpec.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ArchSpec.cpp?rev=318047&view=auto
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Core/ArchSpec.cpp (removed)
@@ -1,1487 +0,0 @@
-//===-- ArchSpec.cpp --------------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "lldb/Core/ArchSpec.h"
-
-#include "lldb/Utility/NameMatches.h"
-#include "lldb/Utility/Stream.h" // for Stream
-#include "lldb/Utility/StringList.h"
-#include "lldb/lldb-defines.h" // for LLDB_INVALID_C...
-#include "lldb/lldb-forward.h" // for RegisterContextSP
-
-#include "llvm/ADT/STLExtras.h"
-#include "llvm/ADT/Twine.h" // for Twine
-#include "llvm/BinaryFormat/COFF.h"
-#include "llvm/BinaryFormat/ELF.h"
-#include "llvm/BinaryFormat/MachO.h" // for CPUType::CPU_T...
-#include "llvm/Support/Compiler.h"   // for LLVM_FALLTHROUGH
-#include "llvm/Support/Host.h"
-
-#include <memory> // for shared_ptr
-#include <string>
-#include <tuple> // for tie, tuple
-
-using namespace lldb;
-using namespace lldb_private;
-
-static bool cores_match(const ArchSpec::Core core1, const ArchSpec::Core core2,
-                        bool try_inverse, bool enforce_exact_match);
-
-namespace lldb_private {
-
-struct CoreDefinition {
-  ByteOrder default_byte_order;
-  uint32_t addr_byte_size;
-  uint32_t min_opcode_byte_size;
-  uint32_t max_opcode_byte_size;
-  llvm::Triple::ArchType machine;
-  ArchSpec::Core core;
-  const char *const name;
-};
-
-} // namespace lldb_private
-
-// This core information can be looked using the ArchSpec::Core as the index
-static const CoreDefinition g_core_definitions[] = {
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_generic,
-     "arm"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv4,
-     "armv4"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv4t,
-     "armv4t"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv5,
-     "armv5"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv5e,
-     "armv5e"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv5t,
-     "armv5t"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv6,
-     "armv6"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv6m,
-     "armv6m"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7,
-     "armv7"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7f,
-     "armv7f"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7s,
-     "armv7s"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7k,
-     "armv7k"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7m,
-     "armv7m"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_armv7em,
-     "armv7em"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::arm, ArchSpec::eCore_arm_xscale,
-     "xscale"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumb,
-     "thumb"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv4t,
-     "thumbv4t"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv5,
-     "thumbv5"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv5e,
-     "thumbv5e"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv6,
-     "thumbv6"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv6m,
-     "thumbv6m"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7,
-     "thumbv7"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7f,
-     "thumbv7f"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7s,
-     "thumbv7s"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7k,
-     "thumbv7k"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7m,
-     "thumbv7m"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::thumb, ArchSpec::eCore_thumbv7em,
-     "thumbv7em"},
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
-     ArchSpec::eCore_arm_arm64, "arm64"},
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
-     ArchSpec::eCore_arm_armv8, "armv8"},
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::aarch64,
-     ArchSpec::eCore_arm_aarch64, "aarch64"},
-
-    // mips32, mips32r2, mips32r3, mips32r5, mips32r6
-    {eByteOrderBig, 4, 2, 4, llvm::Triple::mips, ArchSpec::eCore_mips32,
-     "mips"},
-    {eByteOrderBig, 4, 2, 4, llvm::Triple::mips, ArchSpec::eCore_mips32r2,
-     "mipsr2"},
-    {eByteOrderBig, 4, 2, 4, llvm::Triple::mips, ArchSpec::eCore_mips32r3,
-     "mipsr3"},
-    {eByteOrderBig, 4, 2, 4, llvm::Triple::mips, ArchSpec::eCore_mips32r5,
-     "mipsr5"},
-    {eByteOrderBig, 4, 2, 4, llvm::Triple::mips, ArchSpec::eCore_mips32r6,
-     "mipsr6"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel, ArchSpec::eCore_mips32el,
-     "mipsel"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel,
-     ArchSpec::eCore_mips32r2el, "mipsr2el"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel,
-     ArchSpec::eCore_mips32r3el, "mipsr3el"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel,
-     ArchSpec::eCore_mips32r5el, "mipsr5el"},
-    {eByteOrderLittle, 4, 2, 4, llvm::Triple::mipsel,
-     ArchSpec::eCore_mips32r6el, "mipsr6el"},
-
-    // mips64, mips64r2, mips64r3, mips64r5, mips64r6
-    {eByteOrderBig, 8, 2, 4, llvm::Triple::mips64, ArchSpec::eCore_mips64,
-     "mips64"},
-    {eByteOrderBig, 8, 2, 4, llvm::Triple::mips64, ArchSpec::eCore_mips64r2,
-     "mips64r2"},
-    {eByteOrderBig, 8, 2, 4, llvm::Triple::mips64, ArchSpec::eCore_mips64r3,
-     "mips64r3"},
-    {eByteOrderBig, 8, 2, 4, llvm::Triple::mips64, ArchSpec::eCore_mips64r5,
-     "mips64r5"},
-    {eByteOrderBig, 8, 2, 4, llvm::Triple::mips64, ArchSpec::eCore_mips64r6,
-     "mips64r6"},
-    {eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el,
-     ArchSpec::eCore_mips64el, "mips64el"},
-    {eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el,
-     ArchSpec::eCore_mips64r2el, "mips64r2el"},
-    {eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el,
-     ArchSpec::eCore_mips64r3el, "mips64r3el"},
-    {eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el,
-     ArchSpec::eCore_mips64r5el, "mips64r5el"},
-    {eByteOrderLittle, 8, 2, 4, llvm::Triple::mips64el,
-     ArchSpec::eCore_mips64r6el, "mips64r6el"},
-
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_generic,
-     "powerpc"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc601,
-     "ppc601"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc602,
-     "ppc602"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc603,
-     "ppc603"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc603e,
-     "ppc603e"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc603ev,
-     "ppc603ev"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc604,
-     "ppc604"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc604e,
-     "ppc604e"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc620,
-     "ppc620"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc750,
-     "ppc750"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc7400,
-     "ppc7400"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc7450,
-     "ppc7450"},
-    {eByteOrderBig, 4, 4, 4, llvm::Triple::ppc, ArchSpec::eCore_ppc_ppc970,
-     "ppc970"},
-
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::ppc64le,
-      ArchSpec::eCore_ppc64le_generic, "powerpc64le"},
-    {eByteOrderBig, 8, 4, 4, llvm::Triple::ppc64, ArchSpec::eCore_ppc64_generic,
-     "powerpc64"},
-    {eByteOrderBig, 8, 4, 4, llvm::Triple::ppc64,
-     ArchSpec::eCore_ppc64_ppc970_64, "ppc970-64"},
-
-    {eByteOrderBig, 8, 2, 6, llvm::Triple::systemz,
-     ArchSpec::eCore_s390x_generic, "s390x"},
-
-    {eByteOrderLittle, 4, 4, 4, llvm::Triple::sparc,
-     ArchSpec::eCore_sparc_generic, "sparc"},
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::sparcv9,
-     ArchSpec::eCore_sparc9_generic, "sparcv9"},
-
-    {eByteOrderLittle, 4, 1, 15, llvm::Triple::x86, ArchSpec::eCore_x86_32_i386,
-     "i386"},
-    {eByteOrderLittle, 4, 1, 15, llvm::Triple::x86, ArchSpec::eCore_x86_32_i486,
-     "i486"},
-    {eByteOrderLittle, 4, 1, 15, llvm::Triple::x86,
-     ArchSpec::eCore_x86_32_i486sx, "i486sx"},
-    {eByteOrderLittle, 4, 1, 15, llvm::Triple::x86, ArchSpec::eCore_x86_32_i686,
-     "i686"},
-
-    {eByteOrderLittle, 8, 1, 15, llvm::Triple::x86_64,
-     ArchSpec::eCore_x86_64_x86_64, "x86_64"},
-    {eByteOrderLittle, 8, 1, 15, llvm::Triple::x86_64,
-     ArchSpec::eCore_x86_64_x86_64h, "x86_64h"},
-    {eByteOrderLittle, 4, 4, 4, llvm::Triple::hexagon,
-     ArchSpec::eCore_hexagon_generic, "hexagon"},
-    {eByteOrderLittle, 4, 4, 4, llvm::Triple::hexagon,
-     ArchSpec::eCore_hexagon_hexagonv4, "hexagonv4"},
-    {eByteOrderLittle, 4, 4, 4, llvm::Triple::hexagon,
-     ArchSpec::eCore_hexagon_hexagonv5, "hexagonv5"},
-
-    {eByteOrderLittle, 4, 4, 4, llvm::Triple::UnknownArch,
-     ArchSpec::eCore_uknownMach32, "unknown-mach-32"},
-    {eByteOrderLittle, 8, 4, 4, llvm::Triple::UnknownArch,
-     ArchSpec::eCore_uknownMach64, "unknown-mach-64"},
-
-    {eByteOrderBig, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba3,
-     "kalimba3"},
-    {eByteOrderLittle, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba4,
-     "kalimba4"},
-    {eByteOrderLittle, 4, 1, 1, llvm::Triple::kalimba, ArchSpec::eCore_kalimba5,
-     "kalimba5"}};
-
-// Ensure that we have an entry in the g_core_definitions for each core. If you
-// comment out an entry above,
-// you will need to comment out the corresponding ArchSpec::Core enumeration.
-static_assert(sizeof(g_core_definitions) / sizeof(CoreDefinition) ==
-                  ArchSpec::kNumCores,
-              "make sure we have one core definition for each core");
-
-struct ArchDefinitionEntry {
-  ArchSpec::Core core;
-  uint32_t cpu;
-  uint32_t sub;
-  uint32_t cpu_mask;
-  uint32_t sub_mask;
-};
-
-struct ArchDefinition {
-  ArchitectureType type;
-  size_t num_entries;
-  const ArchDefinitionEntry *entries;
-  const char *name;
-};
-
-size_t ArchSpec::AutoComplete(llvm::StringRef name, StringList &matches) {
-  if (!name.empty()) {
-    for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i) {
-      if (NameMatches(g_core_definitions[i].name, NameMatch::StartsWith, name))
-        matches.AppendString(g_core_definitions[i].name);
-    }
-  } else {
-    for (uint32_t i = 0; i < llvm::array_lengthof(g_core_definitions); ++i)
-      matches.AppendString(g_core_definitions[i].name);
-  }
-  return matches.GetSize();
-}
-
-#define CPU_ANY (UINT32_MAX)
-
-//===----------------------------------------------------------------------===//
-// A table that gets searched linearly for matches. This table is used to
-// convert cpu type and subtypes to architecture names, and to convert
-// architecture names to cpu types and subtypes. The ordering is important and
-// allows the precedence to be set when the table is built.
-#define SUBTYPE_MASK 0x00FFFFFFu
-
-static const ArchDefinitionEntry g_macho_arch_entries[] = {
-    {ArchSpec::eCore_arm_generic, llvm::MachO::CPU_TYPE_ARM, CPU_ANY,
-     UINT32_MAX, UINT32_MAX},
-    {ArchSpec::eCore_arm_generic, llvm::MachO::CPU_TYPE_ARM, 0, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv4, llvm::MachO::CPU_TYPE_ARM, 5, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv4t, llvm::MachO::CPU_TYPE_ARM, 5, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv6, llvm::MachO::CPU_TYPE_ARM, 6, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv6m, llvm::MachO::CPU_TYPE_ARM, 14, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv5, llvm::MachO::CPU_TYPE_ARM, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv5e, llvm::MachO::CPU_TYPE_ARM, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv5t, llvm::MachO::CPU_TYPE_ARM, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_xscale, llvm::MachO::CPU_TYPE_ARM, 8, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7, llvm::MachO::CPU_TYPE_ARM, 9, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7f, llvm::MachO::CPU_TYPE_ARM, 10, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7s, llvm::MachO::CPU_TYPE_ARM, 11, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7k, llvm::MachO::CPU_TYPE_ARM, 12, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7m, llvm::MachO::CPU_TYPE_ARM, 15, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_armv7em, llvm::MachO::CPU_TYPE_ARM, 16, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 1, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 0, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, 13, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_arm_arm64, llvm::MachO::CPU_TYPE_ARM64, CPU_ANY,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_thumb, llvm::MachO::CPU_TYPE_ARM, 0, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv4t, llvm::MachO::CPU_TYPE_ARM, 5, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv5, llvm::MachO::CPU_TYPE_ARM, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv5e, llvm::MachO::CPU_TYPE_ARM, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv6, llvm::MachO::CPU_TYPE_ARM, 6, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv6m, llvm::MachO::CPU_TYPE_ARM, 14, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7, llvm::MachO::CPU_TYPE_ARM, 9, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7f, llvm::MachO::CPU_TYPE_ARM, 10, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7s, llvm::MachO::CPU_TYPE_ARM, 11, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7k, llvm::MachO::CPU_TYPE_ARM, 12, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7m, llvm::MachO::CPU_TYPE_ARM, 15, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_thumbv7em, llvm::MachO::CPU_TYPE_ARM, 16, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_generic, llvm::MachO::CPU_TYPE_POWERPC, CPU_ANY,
-     UINT32_MAX, UINT32_MAX},
-    {ArchSpec::eCore_ppc_generic, llvm::MachO::CPU_TYPE_POWERPC, 0, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc601, llvm::MachO::CPU_TYPE_POWERPC, 1, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc602, llvm::MachO::CPU_TYPE_POWERPC, 2, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc603, llvm::MachO::CPU_TYPE_POWERPC, 3, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc603e, llvm::MachO::CPU_TYPE_POWERPC, 4, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc603ev, llvm::MachO::CPU_TYPE_POWERPC, 5, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc604, llvm::MachO::CPU_TYPE_POWERPC, 6, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc604e, llvm::MachO::CPU_TYPE_POWERPC, 7, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc620, llvm::MachO::CPU_TYPE_POWERPC, 8, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc750, llvm::MachO::CPU_TYPE_POWERPC, 9, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc7400, llvm::MachO::CPU_TYPE_POWERPC, 10, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc7450, llvm::MachO::CPU_TYPE_POWERPC, 11, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc_ppc970, llvm::MachO::CPU_TYPE_POWERPC, 100, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc64_generic, llvm::MachO::CPU_TYPE_POWERPC64, 0,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc64le_generic, llvm::MachO::CPU_TYPE_POWERPC64, CPU_ANY,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_ppc64_ppc970_64, llvm::MachO::CPU_TYPE_POWERPC64, 100,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_32_i386, llvm::MachO::CPU_TYPE_I386, 3, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_32_i486, llvm::MachO::CPU_TYPE_I386, 4, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_32_i486sx, llvm::MachO::CPU_TYPE_I386, 0x84,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_32_i386, llvm::MachO::CPU_TYPE_I386, CPU_ANY,
-     UINT32_MAX, UINT32_MAX},
-    {ArchSpec::eCore_x86_64_x86_64, llvm::MachO::CPU_TYPE_X86_64, 3, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_64_x86_64, llvm::MachO::CPU_TYPE_X86_64, 4, UINT32_MAX,
-     SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_64_x86_64h, llvm::MachO::CPU_TYPE_X86_64, 8,
-     UINT32_MAX, SUBTYPE_MASK},
-    {ArchSpec::eCore_x86_64_x86_64, llvm::MachO::CPU_TYPE_X86_64, CPU_ANY,
-     UINT32_MAX, UINT32_MAX},
-    // Catch any unknown mach architectures so we can always use the object and
-    // symbol mach-o files
-    {ArchSpec::eCore_uknownMach32, 0, 0, 0xFF000000u, 0x00000000u},
-    {ArchSpec::eCore_uknownMach64, llvm::MachO::CPU_ARCH_ABI64, 0, 0xFF000000u,
-     0x00000000u}};
-
-static const ArchDefinition g_macho_arch_def = {
-    eArchTypeMachO, llvm::array_lengthof(g_macho_arch_entries),
-    g_macho_arch_entries, "mach-o"};
-
-//===----------------------------------------------------------------------===//
-// A table that gets searched linearly for matches. This table is used to
-// convert cpu type and subtypes to architecture names, and to convert
-// architecture names to cpu types and subtypes. The ordering is important and
-// allows the precedence to be set when the table is built.
-static const ArchDefinitionEntry g_elf_arch_entries[] = {
-    {ArchSpec::eCore_sparc_generic, llvm::ELF::EM_SPARC, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // Sparc
-    {ArchSpec::eCore_x86_32_i386, llvm::ELF::EM_386, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // Intel 80386
-    {ArchSpec::eCore_x86_32_i486, llvm::ELF::EM_IAMCU, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // Intel MCU // FIXME: is this correct?
-    {ArchSpec::eCore_ppc_generic, llvm::ELF::EM_PPC, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // PowerPC
-    {ArchSpec::eCore_ppc64le_generic, llvm::ELF::EM_PPC64, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // PowerPC64le
-    {ArchSpec::eCore_ppc64_generic, llvm::ELF::EM_PPC64, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // PowerPC64
-    {ArchSpec::eCore_arm_generic, llvm::ELF::EM_ARM, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // ARM
-    {ArchSpec::eCore_arm_aarch64, llvm::ELF::EM_AARCH64, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // ARM64
-    {ArchSpec::eCore_s390x_generic, llvm::ELF::EM_S390, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // SystemZ
-    {ArchSpec::eCore_sparc9_generic, llvm::ELF::EM_SPARCV9,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // SPARC V9
-    {ArchSpec::eCore_x86_64_x86_64, llvm::ELF::EM_X86_64, LLDB_INVALID_CPUTYPE,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // AMD64
-    {ArchSpec::eCore_mips32, llvm::ELF::EM_MIPS, ArchSpec::eMIPSSubType_mips32,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32
-    {ArchSpec::eCore_mips32r2, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips32r2, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32r2
-    {ArchSpec::eCore_mips32r6, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips32r6, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32r6
-    {ArchSpec::eCore_mips32el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips32el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32el
-    {ArchSpec::eCore_mips32r2el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips32r2el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32r2el
-    {ArchSpec::eCore_mips32r6el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips32r6el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips32r6el
-    {ArchSpec::eCore_mips64, llvm::ELF::EM_MIPS, ArchSpec::eMIPSSubType_mips64,
-     0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64
-    {ArchSpec::eCore_mips64r2, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips64r2, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r2
-    {ArchSpec::eCore_mips64r6, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips64r6, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r6
-    {ArchSpec::eCore_mips64el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips64el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64el
-    {ArchSpec::eCore_mips64r2el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips64r2el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r2el
-    {ArchSpec::eCore_mips64r6el, llvm::ELF::EM_MIPS,
-     ArchSpec::eMIPSSubType_mips64r6el, 0xFFFFFFFFu, 0xFFFFFFFFu}, // mips64r6el
-    {ArchSpec::eCore_hexagon_generic, llvm::ELF::EM_HEXAGON,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // HEXAGON
-    {ArchSpec::eCore_kalimba3, llvm::ELF::EM_CSR_KALIMBA,
-     llvm::Triple::KalimbaSubArch_v3, 0xFFFFFFFFu, 0xFFFFFFFFu}, // KALIMBA
-    {ArchSpec::eCore_kalimba4, llvm::ELF::EM_CSR_KALIMBA,
-     llvm::Triple::KalimbaSubArch_v4, 0xFFFFFFFFu, 0xFFFFFFFFu}, // KALIMBA
-    {ArchSpec::eCore_kalimba5, llvm::ELF::EM_CSR_KALIMBA,
-     llvm::Triple::KalimbaSubArch_v5, 0xFFFFFFFFu, 0xFFFFFFFFu} // KALIMBA
-};
-
-static const ArchDefinition g_elf_arch_def = {
-    eArchTypeELF, llvm::array_lengthof(g_elf_arch_entries), g_elf_arch_entries,
-    "elf",
-};
-
-static const ArchDefinitionEntry g_coff_arch_entries[] = {
-    {ArchSpec::eCore_x86_32_i386, llvm::COFF::IMAGE_FILE_MACHINE_I386,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // Intel 80x86
-    {ArchSpec::eCore_ppc_generic, llvm::COFF::IMAGE_FILE_MACHINE_POWERPC,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // PowerPC
-    {ArchSpec::eCore_ppc_generic, llvm::COFF::IMAGE_FILE_MACHINE_POWERPCFP,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // PowerPC (with FPU)
-    {ArchSpec::eCore_arm_generic, llvm::COFF::IMAGE_FILE_MACHINE_ARM,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // ARM
-    {ArchSpec::eCore_arm_armv7, llvm::COFF::IMAGE_FILE_MACHINE_ARMNT,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // ARMv7
-    {ArchSpec::eCore_thumb, llvm::COFF::IMAGE_FILE_MACHINE_THUMB,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu}, // ARMv7
-    {ArchSpec::eCore_x86_64_x86_64, llvm::COFF::IMAGE_FILE_MACHINE_AMD64,
-     LLDB_INVALID_CPUTYPE, 0xFFFFFFFFu, 0xFFFFFFFFu} // AMD64
-};
-
-static const ArchDefinition g_coff_arch_def = {
-    eArchTypeCOFF, llvm::array_lengthof(g_coff_arch_entries),
-    g_coff_arch_entries, "pe-coff",
-};
-
-//===----------------------------------------------------------------------===//
-// Table of all ArchDefinitions
-static const ArchDefinition *g_arch_definitions[] = {
-    &g_macho_arch_def, &g_elf_arch_def, &g_coff_arch_def};
-
-static const size_t k_num_arch_definitions =
-    llvm::array_lengthof(g_arch_definitions);
-
-//===----------------------------------------------------------------------===//
-// Static helper functions.
-
-// Get the architecture definition for a given object type.
-static const ArchDefinition *FindArchDefinition(ArchitectureType arch_type) {
-  for (unsigned int i = 0; i < k_num_arch_definitions; ++i) {
-    const ArchDefinition *def = g_arch_definitions[i];
-    if (def->type == arch_type)
-      return def;
-  }
-  return nullptr;
-}
-
-// Get an architecture definition by name.
-static const CoreDefinition *FindCoreDefinition(llvm::StringRef name) {
-  for (unsigned int i = 0; i < llvm::array_lengthof(g_core_definitions); ++i) {
-    if (name.equals_lower(g_core_definitions[i].name))
-      return &g_core_definitions[i];
-  }
-  return nullptr;
-}
-
-static inline const CoreDefinition *FindCoreDefinition(ArchSpec::Core core) {
-  if (core < llvm::array_lengthof(g_core_definitions))
-    return &g_core_definitions[core];
-  return nullptr;
-}
-
-// Get a definition entry by cpu type and subtype.
-static const ArchDefinitionEntry *
-FindArchDefinitionEntry(const ArchDefinition *def, uint32_t cpu, uint32_t sub) {
-  if (def == nullptr)
-    return nullptr;
-
-  const ArchDefinitionEntry *entries = def->entries;
-  for (size_t i = 0; i < def->num_entries; ++i) {
-    if (entries[i].cpu == (cpu & entries[i].cpu_mask))
-      if (entries[i].sub == (sub & entries[i].sub_mask))
-        return &entries[i];
-  }
-  return nullptr;
-}
-
-static const ArchDefinitionEntry *
-FindArchDefinitionEntry(const ArchDefinition *def, ArchSpec::Core core) {
-  if (def == nullptr)
-    return nullptr;
-
-  const ArchDefinitionEntry *entries = def->entries;
-  for (size_t i = 0; i < def->num_entries; ++i) {
-    if (entries[i].core == core)
-      return &entries[i];
-  }
-  return nullptr;
-}
-
-//===----------------------------------------------------------------------===//
-// Constructors and destructors.
-
-ArchSpec::ArchSpec() {}
-
-ArchSpec::ArchSpec(const char *triple_cstr) {
-  if (triple_cstr)
-    SetTriple(triple_cstr);
-}
-
-ArchSpec::ArchSpec(llvm::StringRef triple_str) { SetTriple(triple_str); }
-
-ArchSpec::ArchSpec(const llvm::Triple &triple) { SetTriple(triple); }
-
-ArchSpec::ArchSpec(ArchitectureType arch_type, uint32_t cpu, uint32_t subtype) {
-  SetArchitecture(arch_type, cpu, subtype);
-}
-
-ArchSpec::~ArchSpec() = default;
-
-//===----------------------------------------------------------------------===//
-// Assignment and initialization.
-
-const ArchSpec &ArchSpec::operator=(const ArchSpec &rhs) {
-  if (this != &rhs) {
-    m_triple = rhs.m_triple;
-    m_core = rhs.m_core;
-    m_byte_order = rhs.m_byte_order;
-    m_distribution_id = rhs.m_distribution_id;
-    m_flags = rhs.m_flags;
-  }
-  return *this;
-}
-
-void ArchSpec::Clear() {
-  m_triple = llvm::Triple();
-  m_core = kCore_invalid;
-  m_byte_order = eByteOrderInvalid;
-  m_distribution_id.Clear();
-  m_flags = 0;
-}
-
-//===----------------------------------------------------------------------===//
-// Predicates.
-
-const char *ArchSpec::GetArchitectureName() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def)
-    return core_def->name;
-  return "unknown";
-}
-
-bool ArchSpec::IsMIPS() const {
-  const llvm::Triple::ArchType machine = GetMachine();
-  if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
-      machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el)
-    return true;
-  return false;
-}
-
-std::string ArchSpec::GetTargetABI() const {
-
-  std::string abi;
-
-  if (IsMIPS()) {
-    switch (GetFlags() & ArchSpec::eMIPSABI_mask) {
-    case ArchSpec::eMIPSABI_N64:
-      abi = "n64";
-      return abi;
-    case ArchSpec::eMIPSABI_N32:
-      abi = "n32";
-      return abi;
-    case ArchSpec::eMIPSABI_O32:
-      abi = "o32";
-      return abi;
-    default:
-      return abi;
-    }
-  }
-  return abi;
-}
-
-void ArchSpec::SetFlags(std::string elf_abi) {
-
-  uint32_t flag = GetFlags();
-  if (IsMIPS()) {
-    if (elf_abi == "n64")
-      flag |= ArchSpec::eMIPSABI_N64;
-    else if (elf_abi == "n32")
-      flag |= ArchSpec::eMIPSABI_N32;
-    else if (elf_abi == "o32")
-      flag |= ArchSpec::eMIPSABI_O32;
-  }
-  SetFlags(flag);
-}
-
-std::string ArchSpec::GetClangTargetCPU() const {
-  std::string cpu;
-  const llvm::Triple::ArchType machine = GetMachine();
-
-  if (machine == llvm::Triple::mips || machine == llvm::Triple::mipsel ||
-      machine == llvm::Triple::mips64 || machine == llvm::Triple::mips64el) {
-    switch (m_core) {
-    case ArchSpec::eCore_mips32:
-    case ArchSpec::eCore_mips32el:
-      cpu = "mips32";
-      break;
-    case ArchSpec::eCore_mips32r2:
-    case ArchSpec::eCore_mips32r2el:
-      cpu = "mips32r2";
-      break;
-    case ArchSpec::eCore_mips32r3:
-    case ArchSpec::eCore_mips32r3el:
-      cpu = "mips32r3";
-      break;
-    case ArchSpec::eCore_mips32r5:
-    case ArchSpec::eCore_mips32r5el:
-      cpu = "mips32r5";
-      break;
-    case ArchSpec::eCore_mips32r6:
-    case ArchSpec::eCore_mips32r6el:
-      cpu = "mips32r6";
-      break;
-    case ArchSpec::eCore_mips64:
-    case ArchSpec::eCore_mips64el:
-      cpu = "mips64";
-      break;
-    case ArchSpec::eCore_mips64r2:
-    case ArchSpec::eCore_mips64r2el:
-      cpu = "mips64r2";
-      break;
-    case ArchSpec::eCore_mips64r3:
-    case ArchSpec::eCore_mips64r3el:
-      cpu = "mips64r3";
-      break;
-    case ArchSpec::eCore_mips64r5:
-    case ArchSpec::eCore_mips64r5el:
-      cpu = "mips64r5";
-      break;
-    case ArchSpec::eCore_mips64r6:
-    case ArchSpec::eCore_mips64r6el:
-      cpu = "mips64r6";
-      break;
-    default:
-      break;
-    }
-  }
-  return cpu;
-}
-
-uint32_t ArchSpec::GetMachOCPUType() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def) {
-    const ArchDefinitionEntry *arch_def =
-        FindArchDefinitionEntry(&g_macho_arch_def, core_def->core);
-    if (arch_def) {
-      return arch_def->cpu;
-    }
-  }
-  return LLDB_INVALID_CPUTYPE;
-}
-
-uint32_t ArchSpec::GetMachOCPUSubType() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def) {
-    const ArchDefinitionEntry *arch_def =
-        FindArchDefinitionEntry(&g_macho_arch_def, core_def->core);
-    if (arch_def) {
-      return arch_def->sub;
-    }
-  }
-  return LLDB_INVALID_CPUTYPE;
-}
-
-uint32_t ArchSpec::GetDataByteSize() const {
-  switch (m_core) {
-  case eCore_kalimba3:
-    return 4;
-  case eCore_kalimba4:
-    return 1;
-  case eCore_kalimba5:
-    return 4;
-  default:
-    return 1;
-  }
-  return 1;
-}
-
-uint32_t ArchSpec::GetCodeByteSize() const {
-  switch (m_core) {
-  case eCore_kalimba3:
-    return 4;
-  case eCore_kalimba4:
-    return 1;
-  case eCore_kalimba5:
-    return 1;
-  default:
-    return 1;
-  }
-  return 1;
-}
-
-llvm::Triple::ArchType ArchSpec::GetMachine() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def)
-    return core_def->machine;
-
-  return llvm::Triple::UnknownArch;
-}
-
-const ConstString &ArchSpec::GetDistributionId() const {
-  return m_distribution_id;
-}
-
-void ArchSpec::SetDistributionId(const char *distribution_id) {
-  m_distribution_id.SetCString(distribution_id);
-}
-
-uint32_t ArchSpec::GetAddressByteSize() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def) {
-    if (core_def->machine == llvm::Triple::mips64 ||
-        core_def->machine == llvm::Triple::mips64el) {
-      // For N32/O32 applications Address size is 4 bytes.
-      if (m_flags & (eMIPSABI_N32 | eMIPSABI_O32))
-        return 4;
-    }
-    return core_def->addr_byte_size;
-  }
-  return 0;
-}
-
-ByteOrder ArchSpec::GetDefaultEndian() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def)
-    return core_def->default_byte_order;
-  return eByteOrderInvalid;
-}
-
-bool ArchSpec::CharIsSignedByDefault() const {
-  switch (m_triple.getArch()) {
-  default:
-    return true;
-
-  case llvm::Triple::aarch64:
-  case llvm::Triple::aarch64_be:
-  case llvm::Triple::arm:
-  case llvm::Triple::armeb:
-  case llvm::Triple::thumb:
-  case llvm::Triple::thumbeb:
-    return m_triple.isOSDarwin() || m_triple.isOSWindows();
-
-  case llvm::Triple::ppc:
-  case llvm::Triple::ppc64:
-    return m_triple.isOSDarwin();
-
-  case llvm::Triple::ppc64le:
-  case llvm::Triple::systemz:
-  case llvm::Triple::xcore:
-    return false;
-  }
-}
-
-lldb::ByteOrder ArchSpec::GetByteOrder() const {
-  if (m_byte_order == eByteOrderInvalid)
-    return GetDefaultEndian();
-  return m_byte_order;
-}
-
-//===----------------------------------------------------------------------===//
-// Mutators.
-
-bool ArchSpec::SetTriple(const llvm::Triple &triple) {
-  m_triple = triple;
-  UpdateCore();
-  return IsValid();
-}
-
-bool lldb_private::ParseMachCPUDashSubtypeTriple(llvm::StringRef triple_str,
-                                                 ArchSpec &arch) {
-  // Accept "12-10" or "12.10" as cpu type/subtype
-  if (triple_str.empty())
-    return false;
-
-  size_t pos = triple_str.find_first_of("-.");
-  if (pos == llvm::StringRef::npos)
-    return false;
-
-  llvm::StringRef cpu_str = triple_str.substr(0, pos);
-  llvm::StringRef remainder = triple_str.substr(pos + 1);
-  if (cpu_str.empty() || remainder.empty())
-    return false;
-
-  llvm::StringRef sub_str;
-  llvm::StringRef vendor;
-  llvm::StringRef os;
-  std::tie(sub_str, remainder) = remainder.split('-');
-  std::tie(vendor, os) = remainder.split('-');
-
-  uint32_t cpu = 0;
-  uint32_t sub = 0;
-  if (cpu_str.getAsInteger(10, cpu) || sub_str.getAsInteger(10, sub))
-    return false;
-
-  if (!arch.SetArchitecture(eArchTypeMachO, cpu, sub))
-    return false;
-  if (!vendor.empty() && !os.empty()) {
-    arch.GetTriple().setVendorName(vendor);
-    arch.GetTriple().setOSName(os);
-  }
-
-  return true;
-}
-
-bool ArchSpec::SetTriple(llvm::StringRef triple) {
-  if (triple.empty()) {
-    Clear();
-    return false;
-  }
-
-  if (ParseMachCPUDashSubtypeTriple(triple, *this))
-    return true;
-
-  SetTriple(llvm::Triple(llvm::Triple::normalize(triple)));
-  return IsValid();
-}
-
-bool ArchSpec::ContainsOnlyArch(const llvm::Triple &normalized_triple) {
-  return !normalized_triple.getArchName().empty() &&
-         normalized_triple.getOSName().empty() &&
-         normalized_triple.getVendorName().empty() &&
-         normalized_triple.getEnvironmentName().empty();
-}
-
-void ArchSpec::MergeFrom(const ArchSpec &other) {
-  if (TripleVendorIsUnspecifiedUnknown() &&
-      !other.TripleVendorIsUnspecifiedUnknown())
-    GetTriple().setVendor(other.GetTriple().getVendor());
-  if (TripleOSIsUnspecifiedUnknown() && !other.TripleOSIsUnspecifiedUnknown())
-    GetTriple().setOS(other.GetTriple().getOS());
-  if (GetTriple().getArch() == llvm::Triple::UnknownArch) {
-    GetTriple().setArch(other.GetTriple().getArch());
-    UpdateCore();
-  }
-  if (GetTriple().getEnvironment() == llvm::Triple::UnknownEnvironment &&
-      !TripleVendorWasSpecified()) {
-    if (other.TripleVendorWasSpecified())
-      GetTriple().setEnvironment(other.GetTriple().getEnvironment());
-  }
-  // If this and other are both arm ArchSpecs and this ArchSpec is a generic
-  // "some kind of arm"
-  // spec but the other ArchSpec is a specific arm core, adopt the specific arm
-  // core.
-  if (GetTriple().getArch() == llvm::Triple::arm &&
-      other.GetTriple().getArch() == llvm::Triple::arm &&
-      IsCompatibleMatch(other) && GetCore() == ArchSpec::eCore_arm_generic &&
-      other.GetCore() != ArchSpec::eCore_arm_generic) {
-    m_core = other.GetCore();
-    CoreUpdated(true);
-  }
-  if (GetFlags() == 0) {
-    SetFlags(other.GetFlags());
-  }
-}
-
-bool ArchSpec::SetArchitecture(ArchitectureType arch_type, uint32_t cpu,
-                               uint32_t sub, uint32_t os) {
-  m_core = kCore_invalid;
-  bool update_triple = true;
-  const ArchDefinition *arch_def = FindArchDefinition(arch_type);
-  if (arch_def) {
-    const ArchDefinitionEntry *arch_def_entry =
-        FindArchDefinitionEntry(arch_def, cpu, sub);
-    if (arch_def_entry) {
-      const CoreDefinition *core_def = FindCoreDefinition(arch_def_entry->core);
-      if (core_def) {
-        m_core = core_def->core;
-        update_triple = false;
-        // Always use the architecture name because it might be more descriptive
-        // than the architecture enum ("armv7" -> llvm::Triple::arm).
-        m_triple.setArchName(llvm::StringRef(core_def->name));
-        if (arch_type == eArchTypeMachO) {
-          m_triple.setVendor(llvm::Triple::Apple);
-
-          // Don't set the OS.  It could be simulator, macosx, ios, watchos,
-          // tvos.  We could
-          // get close with the cpu type - but we can't get it right all of the
-          // time.  Better
-          // to leave this unset so other sections of code will set it when they
-          // have more
-          // information.
-          // NB: don't call m_triple.setOS (llvm::Triple::UnknownOS).  That sets
-          // the OSName to
-          // "unknown" and the ArchSpec::TripleVendorWasSpecified() method says
-          // that any
-          // OSName setting means it was specified.
-        } else if (arch_type == eArchTypeELF) {
-          switch (os) {
-          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;
-          }
-        } else if (arch_type == eArchTypeCOFF && os == llvm::Triple::Win32) {
-          m_triple.setVendor(llvm::Triple::PC);
-          m_triple.setOS(llvm::Triple::Win32);
-        } else {
-          m_triple.setVendor(llvm::Triple::UnknownVendor);
-          m_triple.setOS(llvm::Triple::UnknownOS);
-        }
-        // Fall back onto setting the machine type if the arch by name failed...
-        if (m_triple.getArch() == llvm::Triple::UnknownArch)
-          m_triple.setArch(core_def->machine);
-      }
-    }
-  }
-  CoreUpdated(update_triple);
-  return IsValid();
-}
-
-uint32_t ArchSpec::GetMinimumOpcodeByteSize() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def)
-    return core_def->min_opcode_byte_size;
-  return 0;
-}
-
-uint32_t ArchSpec::GetMaximumOpcodeByteSize() const {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def)
-    return core_def->max_opcode_byte_size;
-  return 0;
-}
-
-bool ArchSpec::IsExactMatch(const ArchSpec &rhs) const {
-  return IsEqualTo(rhs, true);
-}
-
-bool ArchSpec::IsCompatibleMatch(const ArchSpec &rhs) const {
-  return IsEqualTo(rhs, false);
-}
-
-static bool isCompatibleEnvironment(llvm::Triple::EnvironmentType lhs,
-                                    llvm::Triple::EnvironmentType rhs) {
-  if (lhs == rhs)
-    return true;
-
-  // If any of the environment is unknown then they are compatible
-  if (lhs == llvm::Triple::UnknownEnvironment ||
-      rhs == llvm::Triple::UnknownEnvironment)
-    return true;
-
-  // If one of the environment is Android and the other one is EABI then they
-  // are considered to
-  // be compatible. This is required as a workaround for shared libraries
-  // compiled for Android
-  // without the NOTE section indicating that they are using the Android ABI.
-  if ((lhs == llvm::Triple::Android && rhs == llvm::Triple::EABI) ||
-      (rhs == llvm::Triple::Android && lhs == llvm::Triple::EABI) ||
-      (lhs == llvm::Triple::GNUEABI && rhs == llvm::Triple::EABI) ||
-      (rhs == llvm::Triple::GNUEABI && lhs == llvm::Triple::EABI) ||
-      (lhs == llvm::Triple::GNUEABIHF && rhs == llvm::Triple::EABIHF) ||
-      (rhs == llvm::Triple::GNUEABIHF && lhs == llvm::Triple::EABIHF))
-    return true;
-
-  return false;
-}
-
-bool ArchSpec::IsEqualTo(const ArchSpec &rhs, bool exact_match) const {
-  // explicitly ignoring m_distribution_id in this method.
-
-  if (GetByteOrder() != rhs.GetByteOrder())
-    return false;
-
-  const ArchSpec::Core lhs_core = GetCore();
-  const ArchSpec::Core rhs_core = rhs.GetCore();
-
-  const bool core_match = cores_match(lhs_core, rhs_core, true, exact_match);
-
-  if (core_match) {
-    const llvm::Triple &lhs_triple = GetTriple();
-    const llvm::Triple &rhs_triple = rhs.GetTriple();
-
-    const llvm::Triple::VendorType lhs_triple_vendor = lhs_triple.getVendor();
-    const llvm::Triple::VendorType rhs_triple_vendor = rhs_triple.getVendor();
-    if (lhs_triple_vendor != rhs_triple_vendor) {
-      const bool rhs_vendor_specified = rhs.TripleVendorWasSpecified();
-      const bool lhs_vendor_specified = TripleVendorWasSpecified();
-      // Both architectures had the vendor specified, so if they aren't
-      // equal then we return false
-      if (rhs_vendor_specified && lhs_vendor_specified)
-        return false;
-
-      // Only fail if both vendor types are not unknown
-      if (lhs_triple_vendor != llvm::Triple::UnknownVendor &&
-          rhs_triple_vendor != llvm::Triple::UnknownVendor)
-        return false;
-    }
-
-    const llvm::Triple::OSType lhs_triple_os = lhs_triple.getOS();
-    const llvm::Triple::OSType rhs_triple_os = rhs_triple.getOS();
-    if (lhs_triple_os != rhs_triple_os) {
-      const bool rhs_os_specified = rhs.TripleOSWasSpecified();
-      const bool lhs_os_specified = TripleOSWasSpecified();
-      // Both architectures had the OS specified, so if they aren't
-      // equal then we return false
-      if (rhs_os_specified && lhs_os_specified)
-        return false;
-
-      // Only fail if both os types are not unknown
-      if (lhs_triple_os != llvm::Triple::UnknownOS &&
-          rhs_triple_os != llvm::Triple::UnknownOS)
-        return false;
-    }
-
-    const llvm::Triple::EnvironmentType lhs_triple_env =
-        lhs_triple.getEnvironment();
-    const llvm::Triple::EnvironmentType rhs_triple_env =
-        rhs_triple.getEnvironment();
-
-    if (!isCompatibleEnvironment(lhs_triple_env, rhs_triple_env))
-      return false;
-    return true;
-  }
-  return false;
-}
-
-void ArchSpec::UpdateCore() {
-  llvm::StringRef arch_name(m_triple.getArchName());
-  const CoreDefinition *core_def = FindCoreDefinition(arch_name);
-  if (core_def) {
-    m_core = core_def->core;
-    // Set the byte order to the default byte order for an architecture.
-    // This can be modified if needed for cases when cores handle both
-    // big and little endian
-    m_byte_order = core_def->default_byte_order;
-  } else {
-    Clear();
-  }
-}
-
-//===----------------------------------------------------------------------===//
-// Helper methods.
-
-void ArchSpec::CoreUpdated(bool update_triple) {
-  const CoreDefinition *core_def = FindCoreDefinition(m_core);
-  if (core_def) {
-    if (update_triple)
-      m_triple = llvm::Triple(core_def->name, "unknown", "unknown");
-    m_byte_order = core_def->default_byte_order;
-  } else {
-    if (update_triple)
-      m_triple = llvm::Triple();
-    m_byte_order = eByteOrderInvalid;
-  }
-}
-
-//===----------------------------------------------------------------------===//
-// Operators.
-
-static bool cores_match(const ArchSpec::Core core1, const ArchSpec::Core core2,
-                        bool try_inverse, bool enforce_exact_match) {
-  if (core1 == core2)
-    return true;
-
-  switch (core1) {
-  case ArchSpec::kCore_any:
-    return true;
-
-  case ArchSpec::eCore_arm_generic:
-    if (enforce_exact_match)
-      break;
-    LLVM_FALLTHROUGH;
-  case ArchSpec::kCore_arm_any:
-    if (core2 >= ArchSpec::kCore_arm_first && core2 <= ArchSpec::kCore_arm_last)
-      return true;
-    if (core2 >= ArchSpec::kCore_thumb_first &&
-        core2 <= ArchSpec::kCore_thumb_last)
-      return true;
-    if (core2 == ArchSpec::kCore_arm_any)
-      return true;
-    break;
-
-  case ArchSpec::kCore_x86_32_any:
-    if ((core2 >= ArchSpec::kCore_x86_32_first &&
-         core2 <= ArchSpec::kCore_x86_32_last) ||
-        (core2 == ArchSpec::kCore_x86_32_any))
-      return true;
-    break;
-
-  case ArchSpec::kCore_x86_64_any:
-    if ((core2 >= ArchSpec::kCore_x86_64_first &&
-         core2 <= ArchSpec::kCore_x86_64_last) ||
-        (core2 == ArchSpec::kCore_x86_64_any))
-      return true;
-    break;
-
-  case ArchSpec::kCore_ppc_any:
-    if ((core2 >= ArchSpec::kCore_ppc_first &&
-         core2 <= ArchSpec::kCore_ppc_last) ||
-        (core2 == ArchSpec::kCore_ppc_any))
-      return true;
-    break;
-
-  case ArchSpec::kCore_ppc64_any:
-    if ((core2 >= ArchSpec::kCore_ppc64_first &&
-         core2 <= ArchSpec::kCore_ppc64_last) ||
-        (core2 == ArchSpec::kCore_ppc64_any))
-      return true;
-    break;
-
-  case ArchSpec::eCore_arm_armv6m:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_generic)
-        return true;
-      try_inverse = false;
-      if (core2 == ArchSpec::eCore_arm_armv7)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv6m)
-        return true;
-    }
-    break;
-
-  case ArchSpec::kCore_hexagon_any:
-    if ((core2 >= ArchSpec::kCore_hexagon_first &&
-         core2 <= ArchSpec::kCore_hexagon_last) ||
-        (core2 == ArchSpec::kCore_hexagon_any))
-      return true;
-    break;
-
-  // v. https://en.wikipedia.org/wiki/ARM_Cortex-M#Silicon_customization
-  // Cortex-M0 - ARMv6-M - armv6m
-  // Cortex-M3 - ARMv7-M - armv7m
-  // Cortex-M4 - ARMv7E-M - armv7em
-  case ArchSpec::eCore_arm_armv7em:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_generic)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv7m)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv6m)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv7)
-        return true;
-      try_inverse = true;
-    }
-    break;
-
-  // v. https://en.wikipedia.org/wiki/ARM_Cortex-M#Silicon_customization
-  // Cortex-M0 - ARMv6-M - armv6m
-  // Cortex-M3 - ARMv7-M - armv7m
-  // Cortex-M4 - ARMv7E-M - armv7em
-  case ArchSpec::eCore_arm_armv7m:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_generic)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv6m)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv7)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv7em)
-        return true;
-      try_inverse = true;
-    }
-    break;
-
-  case ArchSpec::eCore_arm_armv7f:
-  case ArchSpec::eCore_arm_armv7k:
-  case ArchSpec::eCore_arm_armv7s:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_generic)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv7)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_x86_64_x86_64h:
-    if (!enforce_exact_match) {
-      try_inverse = false;
-      if (core2 == ArchSpec::eCore_x86_64_x86_64)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_arm_armv8:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_arm64)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_aarch64)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_arm_aarch64:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_arm64)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv8)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_arm_arm64:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_arm_aarch64)
-        return true;
-      if (core2 == ArchSpec::eCore_arm_armv8)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32_first &&
-          core2 <= ArchSpec::kCore_mips32_last)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32el:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32el_first &&
-          core2 <= ArchSpec::kCore_mips32el_last)
-        return true;
-      try_inverse = true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32_first &&
-          core2 <= ArchSpec::kCore_mips32_last)
-        return true;
-      if (core2 >= ArchSpec::kCore_mips64_first &&
-          core2 <= ArchSpec::kCore_mips64_last)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64el:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32el_first &&
-          core2 <= ArchSpec::kCore_mips32el_last)
-        return true;
-      if (core2 >= ArchSpec::kCore_mips64el_first &&
-          core2 <= ArchSpec::kCore_mips64el_last)
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64r2:
-  case ArchSpec::eCore_mips64r3:
-  case ArchSpec::eCore_mips64r5:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32_first && core2 <= (core1 - 10))
-        return true;
-      if (core2 >= ArchSpec::kCore_mips64_first && core2 <= (core1 - 1))
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64r2el:
-  case ArchSpec::eCore_mips64r3el:
-  case ArchSpec::eCore_mips64r5el:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32el_first && core2 <= (core1 - 10))
-        return true;
-      if (core2 >= ArchSpec::kCore_mips64el_first && core2 <= (core1 - 1))
-        return true;
-      try_inverse = false;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32r2:
-  case ArchSpec::eCore_mips32r3:
-  case ArchSpec::eCore_mips32r5:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32_first && core2 <= core1)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32r2el:
-  case ArchSpec::eCore_mips32r3el:
-  case ArchSpec::eCore_mips32r5el:
-    if (!enforce_exact_match) {
-      if (core2 >= ArchSpec::kCore_mips32el_first && core2 <= core1)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32r6:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_mips32 || core2 == ArchSpec::eCore_mips32r6)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips32r6el:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_mips32el ||
-          core2 == ArchSpec::eCore_mips32r6el)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64r6:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_mips32 || core2 == ArchSpec::eCore_mips32r6)
-        return true;
-      if (core2 == ArchSpec::eCore_mips64 || core2 == ArchSpec::eCore_mips64r6)
-        return true;
-    }
-    break;
-
-  case ArchSpec::eCore_mips64r6el:
-    if (!enforce_exact_match) {
-      if (core2 == ArchSpec::eCore_mips32el ||
-          core2 == ArchSpec::eCore_mips32r6el)
-        return true;
-      if (core2 == ArchSpec::eCore_mips64el ||
-          core2 == ArchSpec::eCore_mips64r6el)
-        return true;
-    }
-    break;
-
-  default:
-    break;
-  }
-  if (try_inverse)
-    return cores_match(core2, core1, false, enforce_exact_match);
-  return false;
-}
-
-bool lldb_private::operator<(const ArchSpec &lhs, const ArchSpec &rhs) {
-  const ArchSpec::Core lhs_core = lhs.GetCore();
-  const ArchSpec::Core rhs_core = rhs.GetCore();
-  return lhs_core < rhs_core;
-}
-
-bool ArchSpec::IsFullySpecifiedTriple() const {
-  const auto &user_specified_triple = GetTriple();
-
-  bool user_triple_fully_specified = false;
-
-  if ((user_specified_triple.getOS() != llvm::Triple::UnknownOS) ||
-      TripleOSWasSpecified()) {
-    if ((user_specified_triple.getVendor() != llvm::Triple::UnknownVendor) ||
-        TripleVendorWasSpecified()) {
-      const unsigned unspecified = 0;
-      if (user_specified_triple.getOSMajorVersion() != unspecified) {
-        user_triple_fully_specified = true;
-      }
-    }
-  }
-
-  return user_triple_fully_specified;
-}
-
-void ArchSpec::PiecewiseTripleCompare(
-    const ArchSpec &other, bool &arch_different, bool &vendor_different,
-    bool &os_different, bool &os_version_different, bool &env_different) const {
-  const llvm::Triple &me(GetTriple());
-  const llvm::Triple &them(other.GetTriple());
-
-  arch_different = (me.getArch() != them.getArch());
-
-  vendor_different = (me.getVendor() != them.getVendor());
-
-  os_different = (me.getOS() != them.getOS());
-
-  os_version_different = (me.getOSMajorVersion() != them.getOSMajorVersion());
-
-  env_different = (me.getEnvironment() != them.getEnvironment());
-}
-
-bool ArchSpec::IsAlwaysThumbInstructions() const {
-  std::string Status;
-  if (GetTriple().getArch() == llvm::Triple::arm ||
-      GetTriple().getArch() == llvm::Triple::thumb) {
-    // v. https://en.wikipedia.org/wiki/ARM_Cortex-M
-    //
-    // Cortex-M0 through Cortex-M7 are ARM processor cores which can only
-    // execute thumb instructions.  We map the cores to arch names like this:
-    //
-    // Cortex-M0, Cortex-M0+, Cortex-M1:  armv6m
-    // Cortex-M3: armv7m
-    // Cortex-M4, Cortex-M7: armv7em
-
-    if (GetCore() == ArchSpec::Core::eCore_arm_armv7m ||
-        GetCore() == ArchSpec::Core::eCore_arm_armv7em ||
-        GetCore() == ArchSpec::Core::eCore_arm_armv6m) {
-      return true;
-    }
-  }
-  return false;
-}
-
-void ArchSpec::DumpTriple(Stream &s) const {
-  const llvm::Triple &triple = GetTriple();
-  llvm::StringRef arch_str = triple.getArchName();
-  llvm::StringRef vendor_str = triple.getVendorName();
-  llvm::StringRef os_str = triple.getOSName();
-  llvm::StringRef environ_str = triple.getEnvironmentName();
-
-  s.Printf("%s-%s-%s", arch_str.empty() ? "*" : arch_str.str().c_str(),
-           vendor_str.empty() ? "*" : vendor_str.str().c_str(),
-           os_str.empty() ? "*" : os_str.str().c_str());
-
-  if (!environ_str.empty())
-    s.Printf("-%s", environ_str.str().c_str());
-}

Modified: lldb/trunk/source/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/CMakeLists.txt?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/CMakeLists.txt (original)
+++ lldb/trunk/source/Core/CMakeLists.txt Mon Nov 13 08:16:33 2017
@@ -13,7 +13,6 @@ add_lldb_library(lldbCore
   AddressResolver.cpp
   AddressResolverFileLine.cpp
   AddressResolverName.cpp
-  ArchSpec.cpp
   Broadcaster.cpp
   Communication.cpp
   Debugger.cpp

Modified: lldb/trunk/source/Core/FormatEntity.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/FormatEntity.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/FormatEntity.cpp (original)
+++ lldb/trunk/source/Core/FormatEntity.cpp Mon Nov 13 08:16:33 2017
@@ -11,7 +11,6 @@
 
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressRange.h" // for AddressRange
-#include "lldb/Core/ArchSpec.h"     // for ArchSpec
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/RegisterValue.h" // for RegisterValue
@@ -42,6 +41,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Utility/AnsiTerminal.h"
+#include "lldb/Utility/ArchSpec.h"    // for ArchSpec
 #include "lldb/Utility/ConstString.h" // for ConstString, oper...
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"        // for Log

Modified: lldb/trunk/source/Core/ModuleList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ModuleList.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/ModuleList.cpp (original)
+++ lldb/trunk/source/Core/ModuleList.cpp Mon Nov 13 08:16:33 2017
@@ -8,8 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/ModuleList.h"
-
-#include "lldb/Core/ArchSpec.h"     // for ArchSpec
 #include "lldb/Core/FileSpecList.h" // for FileSpecList
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -18,6 +16,7 @@
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/SymbolContext.h" // for SymbolContextList, SymbolCon...
 #include "lldb/Symbol/VariableList.h"
+#include "lldb/Utility/ArchSpec.h"    // for ArchSpec
 #include "lldb/Utility/ConstString.h" // for ConstString
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Logging.h" // for GetLogIfAnyCategoriesSet

Modified: lldb/trunk/source/Core/Value.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/Value.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/Value.cpp (original)
+++ lldb/trunk/source/Core/Value.cpp Mon Nov 13 08:16:33 2017
@@ -10,7 +10,6 @@
 #include "lldb/Core/Value.h"
 
 #include "lldb/Core/Address.h"  // for Address
-#include "lldb/Core/ArchSpec.h" // for ArchSpec
 #include "lldb/Core/Module.h"
 #include "lldb/Core/State.h"
 #include "lldb/Symbol/CompilerType.h"

Modified: lldb/trunk/source/Core/ValueObjectDynamicValue.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectDynamicValue.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectDynamicValue.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectDynamicValue.cpp Mon Nov 13 08:16:33 2017
@@ -8,9 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/ValueObjectDynamicValue.h"
-
-#include "lldb/Core/ArchSpec.h" // for ArchSpec
-#include "lldb/Core/Scalar.h"   // for Scalar, operator!=
+#include "lldb/Core/Scalar.h" // for Scalar, operator!=
 #include "lldb/Core/Value.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/CompilerType.h"

Modified: lldb/trunk/source/Core/ValueObjectMemory.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectMemory.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectMemory.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectMemory.cpp Mon Nov 13 08:16:33 2017
@@ -8,9 +8,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Core/ValueObjectMemory.h"
-
-#include "lldb/Core/ArchSpec.h" // for ArchSpec
-#include "lldb/Core/Scalar.h"   // for Scalar, operator!=
+#include "lldb/Core/Scalar.h" // for Scalar, operator!=
 #include "lldb/Core/Value.h"
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Symbol/Type.h"

Modified: lldb/trunk/source/Core/ValueObjectVariable.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Core/ValueObjectVariable.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/ValueObjectVariable.cpp (original)
+++ lldb/trunk/source/Core/ValueObjectVariable.cpp Mon Nov 13 08:16:33 2017
@@ -11,7 +11,6 @@
 
 #include "lldb/Core/Address.h"      // for Address
 #include "lldb/Core/AddressRange.h" // for AddressRange
-#include "lldb/Core/ArchSpec.h"     // for ArchSpec
 #include "lldb/Core/Module.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Core/Scalar.h" // for Scalar, operator!=

Modified: lldb/trunk/source/Host/common/Host.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Host.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Host.cpp (original)
+++ lldb/trunk/source/Host/common/Host.cpp Mon Nov 13 08:16:33 2017
@@ -48,10 +48,6 @@
 // C++ Includes
 #include <csignal>
 
-// Other libraries and framework includes
-// Project includes
-
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostProcess.h"

Modified: lldb/trunk/source/Host/common/HostInfoBase.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/HostInfoBase.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/HostInfoBase.cpp (original)
+++ lldb/trunk/source/Host/common/HostInfoBase.cpp Mon Nov 13 08:16:33 2017
@@ -9,11 +9,11 @@
 
 #include "lldb/Host/Config.h"
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Host/Host.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/HostInfoBase.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
 

Modified: lldb/trunk/source/Host/common/Symbols.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Host/common/Symbols.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Host/common/Symbols.cpp (original)
+++ lldb/trunk/source/Host/common/Symbols.cpp Mon Nov 13 08:16:33 2017
@@ -8,11 +8,11 @@
 //===----------------------------------------------------------------------===//
 
 #include "lldb/Host/Symbols.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Log.h"

Modified: lldb/trunk/source/Interpreter/CommandObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/CommandObject.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/CommandObject.cpp (original)
+++ lldb/trunk/source/Interpreter/CommandObject.cpp Mon Nov 13 08:16:33 2017
@@ -17,8 +17,8 @@
 #include <stdlib.h>
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Interpreter/Options.h"
+#include "lldb/Utility/ArchSpec.h"
 
 // These are for the Sourcename completers.
 // FIXME: Make a separate file for the completers.

Modified: lldb/trunk/source/Interpreter/OptionGroupFormat.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Interpreter/OptionGroupFormat.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Interpreter/OptionGroupFormat.cpp (original)
+++ lldb/trunk/source/Interpreter/OptionGroupFormat.cpp Mon Nov 13 08:16:33 2017
@@ -9,11 +9,6 @@
 
 #include "lldb/Interpreter/OptionGroupFormat.h"
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/OptionParser.h"
 #include "lldb/Interpreter/CommandInterpreter.h"
 #include "lldb/Target/ExecutionContext.h"

Modified: lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp (original)
+++ lldb/trunk/source/Plugins/Architecture/Arm/ArchitectureArm.cpp Mon Nov 13 08:16:33 2017
@@ -10,10 +10,10 @@
 #include "Plugins/Architecture/Arm/ArchitectureArm.h"
 #include "Plugins/Process/Utility/ARMDefines.h"
 #include "Plugins/Process/Utility/InstructionUtils.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/ArchSpec.h"
 
 using namespace lldb_private;
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/Architecture/Arm/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Architecture/Arm/CMakeLists.txt?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Architecture/Arm/CMakeLists.txt (original)
+++ lldb/trunk/source/Plugins/Architecture/Arm/CMakeLists.txt Mon Nov 13 08:16:33 2017
@@ -5,6 +5,7 @@ add_lldb_library(lldbPluginArchitectureA
     lldbPluginProcessUtility
     lldbCore
     lldbTarget
+    lldbUtility
   LINK_COMPONENTS
     Support
   )

Modified: lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/Hexagon-DYLD/HexagonDYLDRendezvous.cpp Mon Nov 13 08:16:33 2017
@@ -7,10 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Symbol/SymbolContext.h"

Modified: lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp (original)
+++ lldb/trunk/source/Plugins/DynamicLoader/POSIX-DYLD/DYLDRendezvous.cpp Mon Nov 13 08:16:33 2017
@@ -7,10 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
@@ -18,6 +14,7 @@
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"
 

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.cpp Mon Nov 13 08:16:33 2017
@@ -66,7 +66,6 @@
 #include "ClangPersistentVariables.h"
 #include "IRForTarget.h"
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangExpressionParser.h Mon Nov 13 08:16:33 2017
@@ -10,10 +10,10 @@
 #ifndef liblldb_ClangExpressionParser_h_
 #define liblldb_ClangExpressionParser_h_
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Expression/DiagnosticManager.h"
 #include "lldb/Expression/ExpressionParser.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/lldb-public.h"
 

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangFunctionCaller.h Mon Nov 13 08:16:33 2017
@@ -17,7 +17,6 @@
 #include "ClangExpressionHelper.h"
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Core/Value.h"
 #include "lldb/Core/ValueObjectList.h"

Modified: lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h (original)
+++ lldb/trunk/source/Plugins/ExpressionParser/Clang/ClangModulesDeclVendor.h Mon Nov 13 08:16:33 2017
@@ -10,7 +10,6 @@
 #ifndef liblldb_ClangModulesDeclVendor_h
 #define liblldb_ClangModulesDeclVendor_h
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/ClangForward.h"
 #include "lldb/Symbol/DeclVendor.h"
 #include "lldb/Target/Platform.h"

Modified: lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM/EmulateInstructionARM.cpp Mon Nov 13 08:16:33 2017
@@ -12,12 +12,12 @@
 #include "EmulateInstructionARM.h"
 #include "EmulationStateARM.h"
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Interpreter/OptionValueArray.h"
 #include "lldb/Interpreter/OptionValueDictionary.h"
 #include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Stream.h"
 

Modified: lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/ARM64/EmulateInstructionARM64.cpp Mon Nov 13 08:16:33 2017
@@ -12,10 +12,10 @@
 #include <stdlib.h>
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Stream.h"
 

Modified: lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS/EmulateInstructionMIPS.cpp Mon Nov 13 08:16:33 2017
@@ -12,12 +12,12 @@
 #include <stdlib.h>
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Opcode.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Stream.h"

Modified: lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp (original)
+++ lldb/trunk/source/Plugins/Instruction/MIPS64/EmulateInstructionMIPS64.cpp Mon Nov 13 08:16:33 2017
@@ -12,12 +12,12 @@
 #include <stdlib.h>
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Opcode.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Core/RegisterValue.h"
 #include "lldb/Host/PosixApi.h"
 #include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Stream.h"

Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.cpp Mon Nov 13 08:16:33 2017
@@ -27,12 +27,12 @@ typedef struct ar_hdr {
 #include <ar.h>
 #endif
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Host/FileSystem.h"
 #include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/Stream.h"
 #include "lldb/Utility/Timer.h"

Modified: lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/BSD-Archive/ObjectContainerBSDArchive.h Mon Nov 13 08:16:33 2017
@@ -10,10 +10,9 @@
 #ifndef liblldb_ObjectContainerBSDArchive_h_
 #define liblldb_ObjectContainerBSDArchive_h_
 
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/UniqueCStringMap.h"
 #include "lldb/Symbol/ObjectContainer.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/FileSpec.h"
 

Modified: lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectContainer/Universal-Mach-O/ObjectContainerUniversalMachO.cpp Mon Nov 13 08:16:33 2017
@@ -8,12 +8,12 @@
 //===----------------------------------------------------------------------===//
 
 #include "ObjectContainerUniversalMachO.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/Stream.h"
 

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.cpp Mon Nov 13 08:16:33 2017
@@ -13,7 +13,6 @@
 #include <cassert>
 #include <unordered_map>
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -23,6 +22,7 @@
 #include "lldb/Symbol/SymbolContext.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"

Modified: lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h (original)
+++ lldb/trunk/source/Plugins/ObjectFile/ELF/ObjectFileELF.h Mon Nov 13 08:16:33 2017
@@ -16,10 +16,8 @@
 // C++ Includes
 #include <vector>
 
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Symbol/ObjectFile.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/UUID.h"
 #include "lldb/lldb-private.h"

Modified: lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/JIT/ObjectFileJIT.cpp Mon Nov 13 08:16:33 2017
@@ -10,8 +10,6 @@
 #include "llvm/ADT/StringRef.h"
 
 #include "ObjectFileJIT.h"
-
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
@@ -26,6 +24,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/FileSpec.h"

Modified: lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/Mach-O/ObjectFileMachO.cpp Mon Nov 13 08:16:33 2017
@@ -17,7 +17,6 @@
 #include "Plugins/Process/Utility/RegisterContextDarwin_arm64.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_i386.h"
 #include "Plugins/Process/Utility/RegisterContextDarwin_x86_64.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
@@ -38,6 +37,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/ThreadList.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"

Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp (original)
+++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.cpp Mon Nov 13 08:16:33 2017
@@ -10,9 +10,6 @@
 #include "ObjectFilePECOFF.h"
 #include "WindowsMiniDump.h"
 
-#include "llvm/BinaryFormat/COFF.h"
-
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/FileSpecList.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -23,12 +20,14 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/SectionLoadList.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"
 #include "lldb/Utility/UUID.h"
+#include "llvm/BinaryFormat/COFF.h"
 
 #include "llvm/Support/MemoryBuffer.h"
 

Modified: lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp (original)
+++ lldb/trunk/source/Plugins/OperatingSystem/Python/OperatingSystemPython.cpp Mon Nov 13 08:16:33 2017
@@ -17,7 +17,6 @@
 #include "Plugins/Process/Utility/RegisterContextDummy.h"
 #include "Plugins/Process/Utility/RegisterContextMemory.h"
 #include "Plugins/Process/Utility/ThreadMemory.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleTV.cpp Mon Nov 13 08:16:33 2017
@@ -17,7 +17,6 @@
 #include "PlatformRemoteAppleTV.h"
 
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -25,6 +24,7 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteAppleWatch.cpp Mon Nov 13 08:16:33 2017
@@ -17,7 +17,6 @@
 #include "PlatformRemoteAppleWatch.h"
 
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -25,6 +24,7 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteDarwinDevice.cpp Mon Nov 13 08:16:33 2017
@@ -14,7 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/ModuleSpec.h"

Modified: lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp (original)
+++ lldb/trunk/source/Plugins/Platform/MacOSX/PlatformRemoteiOS.cpp Mon Nov 13 08:16:33 2017
@@ -14,7 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Breakpoint/BreakpointLocation.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -22,6 +21,7 @@
 #include "lldb/Host/Host.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Status.h"

Modified: lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h (original)
+++ lldb/trunk/source/Plugins/Process/Linux/NativeProcessLinux.h Mon Nov 13 08:16:33 2017
@@ -13,12 +13,11 @@
 #include <csignal>
 #include <unordered_set>
 
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/Debug.h"
 #include "lldb/Host/HostThread.h"
 #include "lldb/Host/linux/Support.h"
 #include "lldb/Target/MemoryRegionInfo.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
 #include "lldb/lldb-types.h"
 

Modified: lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/DynamicRegisterInfo.cpp Mon Nov 13 08:16:33 2017
@@ -9,14 +9,10 @@
 
 #include "DynamicRegisterInfo.h"
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/DataFormatters/FormatManager.h"
 #include "lldb/Host/StringConvert.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StringExtractor.h"
 #include "lldb/Utility/StructuredData.h"

Modified: lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h (original)
+++ lldb/trunk/source/Plugins/Process/Utility/RegisterInfoInterface.h Mon Nov 13 08:16:33 2017
@@ -10,10 +10,9 @@
 #ifndef lldb_RegisterInfoInterface_h
 #define lldb_RegisterInfoInterface_h
 
-#include <vector>
-
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/lldb-private-types.h"
+#include <vector>
 
 namespace lldb_private {
 

Modified: lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/StopInfoMachException.cpp Mon Nov 13 08:16:33 2017
@@ -14,7 +14,6 @@
 // Other libraries and framework includes
 // Project includes
 #include "lldb/Breakpoint/Watchpoint.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Symbol/Symbol.h"
 #include "lldb/Target/DynamicLoader.h"
 #include "lldb/Target/ExecutionContext.h"

Modified: lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp (original)
+++ lldb/trunk/source/Plugins/Process/Utility/UnwindMacOSXFrameBackchain.cpp Mon Nov 13 08:16:33 2017
@@ -7,11 +7,6 @@
 //
 //===----------------------------------------------------------------------===//
 
-// C Includes
-// C++ Includes
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Symbol/Function.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/Symbol.h"
@@ -19,6 +14,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/ArchSpec.h"
 
 #include "RegisterContextMacOSXFrameBackchain.h"
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h Mon Nov 13 08:16:33 2017
@@ -20,10 +20,8 @@
 #include <string>
 #include <vector>
 
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Target/Process.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/StreamGDBRemote.h"
 #include "lldb/Utility/StructuredData.h"
 

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.cpp Mon Nov 13 08:16:33 2017
@@ -29,7 +29,6 @@
 #include <sstream>
 
 #include "lldb/Breakpoint/Watchpoint.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ProcessGDBRemote.h Mon Nov 13 08:16:33 2017
@@ -18,9 +18,6 @@
 #include <string>
 #include <vector>
 
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Broadcaster.h"
 #include "lldb/Core/LoadedModuleInfoList.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -28,6 +25,7 @@
 #include "lldb/Host/HostThread.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/ConstString.h"
 #include "lldb/Utility/Status.h"
 #include "lldb/Utility/StreamGDBRemote.h"

Modified: lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp (original)
+++ lldb/trunk/source/Plugins/Process/gdb-remote/ThreadGDBRemote.cpp Mon Nov 13 08:16:33 2017
@@ -10,7 +10,6 @@
 #include "ThreadGDBRemote.h"
 
 #include "lldb/Breakpoint/Watchpoint.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/State.h"
 #include "lldb/Target/Platform.h"
 #include "lldb/Target/Process.h"

Modified: lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h (original)
+++ lldb/trunk/source/Plugins/Process/minidump/MinidumpParser.h Mon Nov 13 08:16:33 2017
@@ -14,8 +14,7 @@
 // Project includes
 #include "MinidumpTypes.h"
 
-// Other libraries and framework includes
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBuffer.h"
 #include "lldb/Utility/Status.h"
 

Modified: lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp (original)
+++ lldb/trunk/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp Mon Nov 13 08:16:33 2017
@@ -13,7 +13,6 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Threading.h"
 
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleList.h"
 #include "lldb/Core/ModuleSpec.h"
@@ -22,6 +21,7 @@
 #include "lldb/Core/Section.h"
 #include "lldb/Core/StreamFile.h"
 #include "lldb/Core/Value.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/RegularExpression.h"
 #include "lldb/Utility/StreamString.h"
 #include "lldb/Utility/Timer.h"

Modified: lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/InstEmulation/UnwindAssemblyInstEmulation.cpp Mon Nov 13 08:16:33 2017
@@ -10,7 +10,6 @@
 #include "UnwindAssemblyInstEmulation.h"
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/DumpDataExtractor.h"
 #include "lldb/Core/FormatEntity.h"
@@ -19,6 +18,7 @@
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/Log.h"

Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/UnwindAssembly-x86.cpp Mon Nov 13 08:16:33 2017
@@ -15,7 +15,6 @@
 #include "llvm/Support/TargetSelect.h"
 
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/PluginManager.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Target/ABI.h"
@@ -26,6 +25,7 @@
 #include "lldb/Target/Target.h"
 #include "lldb/Target/Thread.h"
 #include "lldb/Target/UnwindAssembly.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Status.h"
 
 using namespace lldb;

Modified: lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h (original)
+++ lldb/trunk/source/Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h Mon Nov 13 08:16:33 2017
@@ -12,13 +12,12 @@
 
 #include "llvm-c/Disassembler.h"
 
+#include "lldb/Utility/ArchSpec.h"
+#include "lldb/Utility/ConstString.h"
 #include "lldb/lldb-enumerations.h"
 #include "lldb/lldb-forward.h"
 #include "lldb/lldb-private.h"
 
-#include "lldb/Core/ArchSpec.h"
-#include "lldb/Utility/ConstString.h"
-
 #include <map>
 #include <vector>
 

Modified: lldb/trunk/source/Symbol/ClangASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/ClangASTContext.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/ClangASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/ClangASTContext.cpp Mon Nov 13 08:16:33 2017
@@ -70,7 +70,7 @@
 #include "Plugins/ExpressionParser/Clang/ClangFunctionCaller.h"
 #include "Plugins/ExpressionParser/Clang/ClangUserExpression.h"
 #include "Plugins/ExpressionParser/Clang/ClangUtilityFunction.h"
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Flags.h"
 
 #include "lldb/Core/DumpDataExtractor.h"

Modified: lldb/trunk/source/Symbol/CompactUnwindInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/CompactUnwindInfo.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/CompactUnwindInfo.cpp (original)
+++ lldb/trunk/source/Symbol/CompactUnwindInfo.cpp Mon Nov 13 08:16:33 2017
@@ -7,22 +7,18 @@
 //
 //===----------------------------------------------------------------------===//
 
-// C Includes
-// C++ Includes
-#include <algorithm>
-
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Symbol/CompactUnwindInfo.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
-#include "lldb/Core/Section.h"
-#include "lldb/Symbol/CompactUnwindInfo.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Target/Process.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferHeap.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/StreamString.h"
+#include <algorithm>
 
 #include "llvm/Support/MathExtras.h"
 

Modified: lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp (original)
+++ lldb/trunk/source/Symbol/DWARFCallFrameInfo.cpp Mon Nov 13 08:16:33 2017
@@ -7,22 +7,19 @@
 //
 //===----------------------------------------------------------------------===//
 
-// C Includes
-// C++ Includes
-#include <list>
-
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/Section.h"
 #include "lldb/Core/dwarf.h"
 #include "lldb/Host/Host.h"
-#include "lldb/Symbol/DWARFCallFrameInfo.h"
 #include "lldb/Symbol/ObjectFile.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Target/RegisterContext.h"
 #include "lldb/Target/Thread.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Log.h"
 #include "lldb/Utility/Timer.h"
+#include <list>
 
 using namespace lldb;
 using namespace lldb_private;

Modified: lldb/trunk/source/Symbol/JavaASTContext.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Symbol/JavaASTContext.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Symbol/JavaASTContext.cpp (original)
+++ lldb/trunk/source/Symbol/JavaASTContext.cpp Mon Nov 13 08:16:33 2017
@@ -7,9 +7,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include <sstream>
-
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Symbol/JavaASTContext.h"
 #include "lldb/Core/DumpDataExtractor.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/PluginManager.h"
@@ -17,11 +15,12 @@
 #include "lldb/Core/ValueObject.h"
 #include "lldb/Expression/DWARFExpression.h"
 #include "lldb/Symbol/CompilerType.h"
-#include "lldb/Symbol/JavaASTContext.h"
 #include "lldb/Symbol/SymbolFile.h"
 #include "lldb/Symbol/Type.h"
 #include "lldb/Target/Target.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/Stream.h"
+#include <sstream>
 
 #include "Plugins/SymbolFile/DWARF/DWARFASTParserJava.h"
 

Modified: lldb/trunk/source/Target/ThreadPlanTracer.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/ThreadPlanTracer.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Target/ThreadPlanTracer.cpp (original)
+++ lldb/trunk/source/Target/ThreadPlanTracer.cpp Mon Nov 13 08:16:33 2017
@@ -11,9 +11,6 @@
 // C++ Includes
 #include <cstring>
 
-// Other libraries and framework includes
-// Project includes
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Debugger.h"
 #include "lldb/Core/Disassembler.h"
 #include "lldb/Core/Module.h"

Modified: lldb/trunk/source/Target/UnixSignals.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Target/UnixSignals.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Target/UnixSignals.cpp (original)
+++ lldb/trunk/source/Target/UnixSignals.cpp Mon Nov 13 08:16:33 2017
@@ -16,8 +16,8 @@
 #include "Plugins/Process/Utility/LinuxSignals.h"
 #include "Plugins/Process/Utility/MipsLinuxSignals.h"
 #include "Plugins/Process/Utility/NetBSDSignals.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/StringConvert.h"
+#include "lldb/Utility/ArchSpec.h"
 
 using namespace lldb_private;
 

Copied: lldb/trunk/source/Utility/ArchSpec.cpp (from r318046, lldb/trunk/source/Core/ArchSpec.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/ArchSpec.cpp?p2=lldb/trunk/source/Utility/ArchSpec.cpp&p1=lldb/trunk/source/Core/ArchSpec.cpp&r1=318046&r2=318048&rev=318048&view=diff
==============================================================================
--- lldb/trunk/source/Core/ArchSpec.cpp (original)
+++ lldb/trunk/source/Utility/ArchSpec.cpp Mon Nov 13 08:16:33 2017
@@ -7,14 +7,12 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "lldb/Core/ArchSpec.h"
+#include "lldb/Utility/ArchSpec.h"
 
 #include "lldb/Utility/NameMatches.h"
 #include "lldb/Utility/Stream.h" // for Stream
 #include "lldb/Utility/StringList.h"
 #include "lldb/lldb-defines.h" // for LLDB_INVALID_C...
-#include "lldb/lldb-forward.h" // for RegisterContextSP
-
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/Twine.h" // for Twine
 #include "llvm/BinaryFormat/COFF.h"
@@ -23,10 +21,6 @@
 #include "llvm/Support/Compiler.h"   // for LLVM_FALLTHROUGH
 #include "llvm/Support/Host.h"
 
-#include <memory> // for shared_ptr
-#include <string>
-#include <tuple> // for tie, tuple
-
 using namespace lldb;
 using namespace lldb_private;
 
@@ -182,7 +176,7 @@ static const CoreDefinition g_core_defin
      "ppc970"},
 
     {eByteOrderLittle, 8, 4, 4, llvm::Triple::ppc64le,
-      ArchSpec::eCore_ppc64le_generic, "powerpc64le"},
+     ArchSpec::eCore_ppc64le_generic, "powerpc64le"},
     {eByteOrderBig, 8, 4, 4, llvm::Triple::ppc64, ArchSpec::eCore_ppc64_generic,
      "powerpc64"},
     {eByteOrderBig, 8, 4, 4, llvm::Triple::ppc64,
@@ -460,7 +454,9 @@ static const ArchDefinitionEntry g_elf_a
 };
 
 static const ArchDefinition g_elf_arch_def = {
-    eArchTypeELF, llvm::array_lengthof(g_elf_arch_entries), g_elf_arch_entries,
+    eArchTypeELF,
+    llvm::array_lengthof(g_elf_arch_entries),
+    g_elf_arch_entries,
     "elf",
 };
 
@@ -482,8 +478,10 @@ static const ArchDefinitionEntry g_coff_
 };
 
 static const ArchDefinition g_coff_arch_def = {
-    eArchTypeCOFF, llvm::array_lengthof(g_coff_arch_entries),
-    g_coff_arch_entries, "pe-coff",
+    eArchTypeCOFF,
+    llvm::array_lengthof(g_coff_arch_entries),
+    g_coff_arch_entries,
+    "pe-coff",
 };
 
 //===----------------------------------------------------------------------===//

Modified: lldb/trunk/source/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Utility/CMakeLists.txt?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/source/Utility/CMakeLists.txt (original)
+++ lldb/trunk/source/Utility/CMakeLists.txt Mon Nov 13 08:16:33 2017
@@ -40,6 +40,7 @@ if (LLVM_BUILD_STATIC)
 endif()
 
 add_lldb_library(lldbUtility
+  ArchSpec.cpp
   Baton.cpp
   Connection.cpp
   ConstString.cpp

Removed: lldb/trunk/unittests/Core/ArchSpecTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/ArchSpecTest.cpp?rev=318047&view=auto
==============================================================================
--- lldb/trunk/unittests/Core/ArchSpecTest.cpp (original)
+++ lldb/trunk/unittests/Core/ArchSpecTest.cpp (removed)
@@ -1,155 +0,0 @@
-//===-- ArchSpecTest.cpp ----------------------------------------*- C++ -*-===//
-//
-//                     The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
-//
-//===----------------------------------------------------------------------===//
-
-#include "gtest/gtest.h"
-
-#include "lldb/Core/ArchSpec.h"
-
-#include "llvm/BinaryFormat/MachO.h"
-
-using namespace lldb;
-using namespace lldb_private;
-
-TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleSimple) {
-
-  // Success conditions.  Valid cpu/subtype combinations using both - and .
-  ArchSpec AS;
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(10u, AS.GetMachOCPUSubType());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(15u, AS.GetMachOCPUSubType());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12.15", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(15u, AS.GetMachOCPUSubType());
-
-  // Failure conditions.
-
-  // Valid string, unknown cpu/subtype.
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("13.11", AS));
-  EXPECT_EQ(0u, AS.GetMachOCPUType());
-  EXPECT_EQ(0u, AS.GetMachOCPUSubType());
-
-  // Missing / invalid cpu or subtype
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("13", AS));
-
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("13.A", AS));
-
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("A.13", AS));
-
-  // Empty string.
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("", AS));
-}
-
-TEST(ArchSpecTest, TestParseMachCPUDashSubtypeTripleExtra) {
-  ArchSpec AS;
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15-vendor-os", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(15u, AS.GetMachOCPUSubType());
-  EXPECT_EQ("vendor", AS.GetTriple().getVendorName());
-  EXPECT_EQ("os", AS.GetTriple().getOSName());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10-vendor-os-name", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(10u, AS.GetMachOCPUSubType());
-  EXPECT_EQ("vendor", AS.GetTriple().getVendorName());
-  EXPECT_EQ("os", AS.GetTriple().getOSName());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-15-vendor.os-name", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(15u, AS.GetMachOCPUSubType());
-  EXPECT_EQ("vendor.os", AS.GetTriple().getVendorName());
-  EXPECT_EQ("name", AS.GetTriple().getOSName());
-
-  // These there should parse correctly, but the vendor / OS should be defaulted
-  // since they are unrecognized.
-  AS = ArchSpec();
-  EXPECT_TRUE(ParseMachCPUDashSubtypeTriple("12-10-vendor", AS));
-  EXPECT_EQ(12u, AS.GetMachOCPUType());
-  EXPECT_EQ(10u, AS.GetMachOCPUSubType());
-  EXPECT_EQ("apple", AS.GetTriple().getVendorName());
-  EXPECT_EQ("", AS.GetTriple().getOSName());
-
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("12.10.10", AS));
-
-  AS = ArchSpec();
-  EXPECT_FALSE(ParseMachCPUDashSubtypeTriple("12-10.10", AS));
-}
-
-TEST(ArchSpecTest, TestSetTriple) {
-  ArchSpec AS;
-
-  // Various flavors of valid triples.
-  EXPECT_TRUE(AS.SetTriple("12-10-apple-darwin"));
-  EXPECT_EQ(uint32_t(llvm::MachO::CPU_TYPE_ARM), AS.GetMachOCPUType());
-  EXPECT_EQ(10u, AS.GetMachOCPUSubType());
-  EXPECT_TRUE(llvm::StringRef(AS.GetTriple().str())
-                  .consume_front("armv7f-apple-darwin"));
-  EXPECT_EQ(ArchSpec::eCore_arm_armv7f, AS.GetCore());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(AS.SetTriple("18.100-apple-darwin"));
-  EXPECT_EQ(uint32_t(llvm::MachO::CPU_TYPE_POWERPC), AS.GetMachOCPUType());
-  EXPECT_EQ(100u, AS.GetMachOCPUSubType());
-  EXPECT_TRUE(llvm::StringRef(AS.GetTriple().str())
-                  .consume_front("powerpc-apple-darwin"));
-  EXPECT_EQ(ArchSpec::eCore_ppc_ppc970, AS.GetCore());
-
-  AS = ArchSpec();
-  EXPECT_TRUE(AS.SetTriple("i686-pc-windows"));
-  EXPECT_EQ(llvm::Triple::x86, AS.GetTriple().getArch());
-  EXPECT_EQ(llvm::Triple::PC, AS.GetTriple().getVendor());
-  EXPECT_EQ(llvm::Triple::Win32, AS.GetTriple().getOS());
-  EXPECT_TRUE(
-      llvm::StringRef(AS.GetTriple().str()).consume_front("i686-pc-windows"));
-  EXPECT_STREQ("i686", AS.GetArchitectureName());
-  EXPECT_EQ(ArchSpec::eCore_x86_32_i686, AS.GetCore());
-
-  // Various flavors of invalid triples.
-  AS = ArchSpec();
-  EXPECT_FALSE(AS.SetTriple("unknown-unknown-unknown"));
-
-  AS = ArchSpec();
-  EXPECT_FALSE(AS.SetTriple("unknown"));
-
-  AS = ArchSpec();
-  EXPECT_FALSE(AS.SetTriple(""));
-}
-
-TEST(ArchSpecTest, MergeFrom) {
-  ArchSpec A;
-  ArchSpec B("x86_64-pc-linux");
-
-  EXPECT_FALSE(A.IsValid());
-  ASSERT_TRUE(B.IsValid());
-  EXPECT_EQ(llvm::Triple::ArchType::x86_64, B.GetTriple().getArch());
-  EXPECT_EQ(llvm::Triple::VendorType::PC, B.GetTriple().getVendor());
-  EXPECT_EQ(llvm::Triple::OSType::Linux, B.GetTriple().getOS());
-  EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, B.GetCore());
-
-  A.MergeFrom(B);
-  ASSERT_TRUE(A.IsValid());
-  EXPECT_EQ(llvm::Triple::ArchType::x86_64, A.GetTriple().getArch());
-  EXPECT_EQ(llvm::Triple::VendorType::PC, A.GetTriple().getVendor());
-  EXPECT_EQ(llvm::Triple::OSType::Linux, A.GetTriple().getOS());
-  EXPECT_EQ(ArchSpec::eCore_x86_64_x86_64, A.GetCore());
-}

Modified: lldb/trunk/unittests/Core/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Core/CMakeLists.txt?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Core/CMakeLists.txt Mon Nov 13 08:16:33 2017
@@ -1,5 +1,4 @@
 add_lldb_unittest(LLDBCoreTests
-  ArchSpecTest.cpp
   BroadcasterTest.cpp
   DataExtractorTest.cpp
   ListenerTest.cpp

Modified: lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp (original)
+++ lldb/trunk/unittests/Process/minidump/MinidumpParserTest.cpp Mon Nov 13 08:16:33 2017
@@ -15,20 +15,18 @@
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_32.h"
 #include "Plugins/Process/minidump/RegisterContextMinidump_x86_64.h"
 
-// Other libraries and framework includes
-#include "gtest/gtest.h"
-
-#include "lldb/Core/ArchSpec.h"
+#include "TestingSupport/TestUtilities.h"
 #include "lldb/Target/MemoryRegionInfo.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/DataBufferLLVM.h"
 #include "lldb/Utility/DataExtractor.h"
 #include "lldb/Utility/FileSpec.h"
-#include "TestingSupport/TestUtilities.h"
 #include "llvm/ADT/ArrayRef.h"
 #include "llvm/ADT/Optional.h"
 #include "llvm/Support/FileSystem.h"
 #include "llvm/Support/MemoryBuffer.h"
 #include "llvm/Support/Path.h"
+#include "gtest/gtest.h"
 
 // C includes
 

Modified: lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp (original)
+++ lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp Mon Nov 13 08:16:33 2017
@@ -18,8 +18,8 @@
 #include "Plugins/ObjectFile/PECOFF/ObjectFilePECOFF.h"
 #include "Plugins/SymbolFile/DWARF/SymbolFileDWARF.h"
 #include "Plugins/SymbolFile/PDB/SymbolFilePDB.h"
+#include "TestingSupport/TestUtilities.h"
 #include "lldb/Core/Address.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Core/Module.h"
 #include "lldb/Core/ModuleSpec.h"
 #include "lldb/Host/HostInfo.h"
@@ -27,8 +27,8 @@
 #include "lldb/Symbol/CompileUnit.h"
 #include "lldb/Symbol/LineTable.h"
 #include "lldb/Symbol/SymbolVendor.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/FileSpec.h"
-#include "TestingSupport/TestUtilities.h"
 
 using namespace lldb_private;
 

Modified: lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp (original)
+++ lldb/trunk/unittests/UnwindAssembly/InstEmulation/TestArm64InstEmulation.cpp Mon Nov 13 08:16:33 2017
@@ -17,9 +17,9 @@
 
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressRange.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Symbol/UnwindPlan.h"
 #include "lldb/Target/UnwindAssembly.h"
+#include "lldb/Utility/ArchSpec.h"
 
 #include "Plugins/Disassembler/llvm/DisassemblerLLVMC.h"
 #include "Plugins/Instruction/ARM64/EmulateInstructionARM64.h"

Modified: lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp (original)
+++ lldb/trunk/unittests/UnwindAssembly/x86/Testx86AssemblyInspectionEngine.cpp Mon Nov 13 08:16:33 2017
@@ -16,8 +16,8 @@
 #include "Plugins/UnwindAssembly/x86/x86AssemblyInspectionEngine.h"
 #include "lldb/Core/Address.h"
 #include "lldb/Core/AddressRange.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Symbol/UnwindPlan.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "lldb/Utility/StreamString.h"
 
 #include "llvm/Support/TargetSelect.h"

Copied: lldb/trunk/unittests/Utility/ArchSpecTest.cpp (from r318046, lldb/trunk/unittests/Core/ArchSpecTest.cpp)
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/ArchSpecTest.cpp?p2=lldb/trunk/unittests/Utility/ArchSpecTest.cpp&p1=lldb/trunk/unittests/Core/ArchSpecTest.cpp&r1=318046&r2=318048&rev=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/Core/ArchSpecTest.cpp (original)
+++ lldb/trunk/unittests/Utility/ArchSpecTest.cpp Mon Nov 13 08:16:33 2017
@@ -9,8 +9,7 @@
 
 #include "gtest/gtest.h"
 
-#include "lldb/Core/ArchSpec.h"
-
+#include "lldb/Utility/ArchSpec.h"
 #include "llvm/BinaryFormat/MachO.h"
 
 using namespace lldb;

Modified: lldb/trunk/unittests/Utility/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/Utility/CMakeLists.txt?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/Utility/CMakeLists.txt (original)
+++ lldb/trunk/unittests/Utility/CMakeLists.txt Mon Nov 13 08:16:33 2017
@@ -1,4 +1,5 @@
 add_lldb_unittest(UtilityTests
+  ArchSpecTest.cpp
   ConstStringTest.cpp
   JSONTest.cpp
   LogTest.cpp

Modified: lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp (original)
+++ lldb/trunk/unittests/tools/lldb-server/tests/TestClient.cpp Mon Nov 13 08:16:33 2017
@@ -8,7 +8,6 @@
 //===----------------------------------------------------------------------===//
 
 #include "TestClient.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Host/HostInfo.h"
 #include "lldb/Host/common/TCPSocket.h"
 #include "lldb/Host/posix/ConnectionFileDescriptorPosix.h"

Modified: lldb/trunk/unittests/tools/lldb-server/tests/TestClient.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/tools/lldb-server/tests/TestClient.h?rev=318048&r1=318047&r2=318048&view=diff
==============================================================================
--- lldb/trunk/unittests/tools/lldb-server/tests/TestClient.h (original)
+++ lldb/trunk/unittests/tools/lldb-server/tests/TestClient.h Mon Nov 13 08:16:33 2017
@@ -9,8 +9,8 @@
 
 #include "MessageObjects.h"
 #include "Plugins/Process/gdb-remote/GDBRemoteCommunicationClient.h"
-#include "lldb/Core/ArchSpec.h"
 #include "lldb/Target/ProcessLaunchInfo.h"
+#include "lldb/Utility/ArchSpec.h"
 #include "llvm/ADT/Optional.h"
 #include <memory>
 #include <string>




More information about the lldb-commits mailing list