1 //===-- CommandOptionValidators.cpp ---------------------------------------===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #include "lldb/Interpreter/CommandOptionValidators.h"
11 #include "lldb/Interpreter/CommandInterpreter.h"
12 #include "lldb/Target/Platform.h"
15 using namespace lldb_private
;
17 bool PosixPlatformCommandOptionValidator::IsValid(
18 Platform
&platform
, const ExecutionContext
&target
) const {
19 llvm::Triple::OSType os
=
20 platform
.GetSystemArchitecture().GetTriple().getOS();
22 // Are there any other platforms that are not POSIX-compatible?
23 case llvm::Triple::Win32
:
30 const char *PosixPlatformCommandOptionValidator::ShortConditionString() const {
34 const char *PosixPlatformCommandOptionValidator::LongConditionString() const {
35 return "Option only valid for POSIX-compliant hosts.";