]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/Host/StringConvert.h
Merge clang 7.0.1 and several follow-up changes
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / Host / StringConvert.h
1 //===-- StringConvert.h -----------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef liblldb_StringConvert_h_
11 #define liblldb_StringConvert_h_
12
13 // C Includes
14 #include <stdint.h>
15
16 // C++ Includes
17
18 // Other libraries and framework includes
19 // Project includes
20
21 namespace lldb_private {
22
23 namespace StringConvert {
24
25 //----------------------------------------------------------------------
26 /// @namespace StringConvert StringConvert.h "lldb/Host/StringConvert.h"
27 /// Utility classes for converting strings into Integers
28 //----------------------------------------------------------------------
29
30 int32_t ToSInt32(const char *s, int32_t fail_value = 0, int base = 0,
31                  bool *success_ptr = nullptr);
32
33 uint32_t ToUInt32(const char *s, uint32_t fail_value = 0, int base = 0,
34                   bool *success_ptr = nullptr);
35
36 int64_t ToSInt64(const char *s, int64_t fail_value = 0, int base = 0,
37                  bool *success_ptr = nullptr);
38
39 uint64_t ToUInt64(const char *s, uint64_t fail_value = 0, int base = 0,
40                   bool *success_ptr = nullptr);
41
42 double ToDouble(const char *s, double fail_value = 0.0,
43                 bool *success_ptr = nullptr);
44 } // namespace StringConvert
45 } // namespace lldb_private
46
47 #endif