Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:50

0001 //===-- OptionGroupArchitecture.h -------------------------------*- C++ -*-===//
0002 //
0003 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0004 // See https://llvm.org/LICENSE.txt for license information.
0005 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0006 //
0007 //===----------------------------------------------------------------------===//
0008 
0009 #ifndef LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H
0010 #define LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H
0011 
0012 #include "lldb/Interpreter/Options.h"
0013 #include "lldb/Utility/ArchSpec.h"
0014 
0015 namespace lldb_private {
0016 
0017 // OptionGroupArchitecture
0018 
0019 class OptionGroupArchitecture : public OptionGroup {
0020 public:
0021   OptionGroupArchitecture() = default;
0022 
0023   ~OptionGroupArchitecture() override = default;
0024 
0025   llvm::ArrayRef<OptionDefinition> GetDefinitions() override;
0026 
0027   Status SetOptionValue(uint32_t option_idx, llvm::StringRef option_value,
0028                         ExecutionContext *execution_context) override;
0029 
0030   void OptionParsingStarting(ExecutionContext *execution_context) override;
0031 
0032   bool GetArchitecture(Platform *platform, ArchSpec &arch);
0033 
0034   bool ArchitectureWasSpecified() const { return !m_arch_str.empty(); }
0035 
0036   llvm::StringRef GetArchitectureName() const { return m_arch_str; }
0037 
0038 protected:
0039   std::string m_arch_str; // Save the arch triple in case a platform is
0040                           // specified after the architecture
0041 };
0042 
0043 } // namespace lldb_private
0044 
0045 #endif // LLDB_INTERPRETER_OPTIONGROUPARCHITECTURE_H