Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / source / Host / macosx / cfcpp / CFCString.h
blobe8d6dada7e09f1ab62661fb79f31e07d91f6d2d9
1 //===-- CFCString.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 //===----------------------------------------------------------------------===//
9 #ifndef LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H
10 #define LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H
12 #include <iosfwd>
14 #include "CFCReleaser.h"
16 class CFCString : public CFCReleaser<CFStringRef> {
17 public:
18 // Constructors and Destructors
19 CFCString(CFStringRef cf_str = NULL);
20 CFCString(const char *s, CFStringEncoding encoding = kCFStringEncodingUTF8);
21 CFCString(const CFCString &rhs);
22 CFCString &operator=(const CFCString &rhs);
23 ~CFCString() override;
25 const char *GetFileSystemRepresentation(std::string &str);
26 CFStringRef SetFileSystemRepresentation(const char *path);
27 CFStringRef SetFileSystemRepresentationFromCFType(CFTypeRef cf_type);
28 CFStringRef SetFileSystemRepresentationAndExpandTilde(const char *path);
29 const char *UTF8(std::string &str);
30 CFIndex GetLength() const;
31 static const char *UTF8(CFStringRef cf_str, std::string &str);
32 static const char *FileSystemRepresentation(CFStringRef cf_str,
33 std::string &str);
34 static const char *ExpandTildeInPath(const char *path,
35 std::string &expanded_path);
38 #endif // LLDB_SOURCE_HOST_MACOSX_CFCPP_CFCSTRING_H