[sanitizer] Improve FreeBSD ASLR detection
[llvm-project.git] / lldb / tools / debugserver / source / MacOSX / CFString.h
blob3cc27eea68e3bbd40c92133c17dd0d12f5c88dba
1 //===-- CFString.h ----------------------------------------------*- C++ -*-===//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // Created by Greg Clayton on 1/16/08.
11 //===----------------------------------------------------------------------===//
13 #ifndef LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_CFSTRING_H
14 #define LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_CFSTRING_H
16 #include "CFUtils.h"
17 #include <iosfwd>
19 class CFString : public CFReleaser<CFStringRef> {
20 public:
21 // Constructors and Destructors
22 CFString(CFStringRef cf_str = NULL);
23 CFString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
24 CFString(const CFString &rhs);
25 CFString &operator=(const CFString &rhs);
26 virtual ~CFString();
28 const char *GetFileSystemRepresentation(std::string &str);
29 CFStringRef SetFileSystemRepresentation(const char *path);
30 CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type);
31 CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path);
32 const char *UTF8(std::string &str);
33 CFIndex GetLength() const;
34 static const char *UTF8(CFStringRef cf_str, std::string &str);
35 static const char *FileSystemRepresentation(CFStringRef cf_str,
36 std::string &str);
37 static const char *GlobPath(const char *path, std::string &expanded_path);
40 #endif // LLDB_TOOLS_DEBUGSERVER_SOURCE_MACOSX_CFSTRING_H