Back to home page

EIC code displayed by LXR

 
 

    


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

0001 //===-- UriParser.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_UTILITY_URIPARSER_H
0010 #define LLDB_UTILITY_URIPARSER_H
0011 
0012 #include "llvm/ADT/StringRef.h"
0013 #include <optional>
0014 
0015 namespace llvm {
0016 class raw_ostream;
0017 } // namespace llvm
0018 
0019 namespace lldb_private {
0020 
0021 struct URI {
0022   llvm::StringRef scheme;
0023   llvm::StringRef hostname;
0024   std::optional<uint16_t> port;
0025   llvm::StringRef path;
0026 
0027   bool operator==(const URI &R) const {
0028     return port == R.port && scheme == R.scheme && hostname == R.hostname &&
0029            path == R.path;
0030   }
0031 
0032   static std::optional<URI> Parse(llvm::StringRef uri);
0033 };
0034 
0035 llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const URI &U);
0036 
0037 } // namespace lldb_private
0038 
0039 #endif // LLDB_UTILITY_URIPARSER_H