Coverage Report

Created: 2022-01-25 06:29

/Users/buildslave/jenkins/workspace/coverage/llvm-project/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.cpp
Line
Count
Source (jump to first uncovered line)
1
//===-- SWIGPythonBridge.cpp ----------------------------------------------===//
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
#include "lldb/Host/Config.h"
10
#include "lldb/lldb-enumerations.h"
11
12
#if LLDB_ENABLE_PYTHON
13
14
// LLDB Python header must be included first
15
#include "lldb-python.h"
16
17
#include "SWIGPythonBridge.h"
18
19
using namespace lldb;
20
21
namespace lldb_private {
22
23
template <typename T> const char *GetPythonValueFormatString(T t);
24
0
template <> const char *GetPythonValueFormatString(char *) { return "s"; }
25
0
template <> const char *GetPythonValueFormatString(char) { return "b"; }
26
0
template <> const char *GetPythonValueFormatString(unsigned char) {
27
0
  return "B";
28
0
}
29
0
template <> const char *GetPythonValueFormatString(short) { return "h"; }
30
0
template <> const char *GetPythonValueFormatString(unsigned short) {
31
0
  return "H";
32
0
}
33
0
template <> const char *GetPythonValueFormatString(int) { return "i"; }
34
0
template <> const char *GetPythonValueFormatString(unsigned int) { return "I"; }
35
0
template <> const char *GetPythonValueFormatString(long) { return "l"; }
36
3
template <> const char *GetPythonValueFormatString(unsigned long) {
37
3
  return "k";
38
3
}
39
0
template <> const char *GetPythonValueFormatString(long long) { return "L"; }
40
10
template <> const char *GetPythonValueFormatString(unsigned long long) {
41
10
  return "K";
42
10
}
43
0
template <> const char *GetPythonValueFormatString(float) { return "f"; }
44
0
template <> const char *GetPythonValueFormatString(double) { return "d"; }
45
46
} // namespace lldb_private
47
48
#endif // LLDB_ENABLE_PYTHON