Skip to content

Commit 084faa0

Browse files
committed
[lldb/Python] Unify PythonFormat & GetPythonValueFormatString (NFC)
This patch removes all occurences to GetPythonValueFormatString and use the template specialization of PythonFormat structs instead. Differential Revision: https://reviews.llvm.org/D134033 Signed-off-by: Med Ismail Bennani <[email protected]>
1 parent 0302786 commit 084faa0

File tree

3 files changed

+0
-70
lines changed

3 files changed

+0
-70
lines changed

lldb/source/Plugins/ScriptInterpreter/Python/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ add_lldb_library(lldbPluginScriptInterpreterPython PLUGIN
2020
ScriptedPythonInterface.cpp
2121
ScriptedProcessPythonInterface.cpp
2222
ScriptedThreadPythonInterface.cpp
23-
SWIGPythonBridge.cpp
2423

2524
LINK_LIBS
2625
lldbBreakpoint

lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.cpp

Lines changed: 0 additions & 48 deletions
This file was deleted.

lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -86,27 +86,6 @@ python::ScopedPythonObject<lldb::SBEvent> ToSWIGWrapper(Event *event);
8686

8787
} // namespace python
8888

89-
// GetPythonValueFormatString provides a system independent type safe way to
90-
// convert a variable's type into a python value format. Python value formats
91-
// are defined in terms of builtin C types and could change from system to as
92-
// the underlying typedef for uint* types, size_t, off_t and other values
93-
// change.
94-
95-
template <typename T> const char *GetPythonValueFormatString(T t);
96-
template <> const char *GetPythonValueFormatString(char *);
97-
template <> const char *GetPythonValueFormatString(char);
98-
template <> const char *GetPythonValueFormatString(unsigned char);
99-
template <> const char *GetPythonValueFormatString(short);
100-
template <> const char *GetPythonValueFormatString(unsigned short);
101-
template <> const char *GetPythonValueFormatString(int);
102-
template <> const char *GetPythonValueFormatString(unsigned int);
103-
template <> const char *GetPythonValueFormatString(long);
104-
template <> const char *GetPythonValueFormatString(unsigned long);
105-
template <> const char *GetPythonValueFormatString(long long);
106-
template <> const char *GetPythonValueFormatString(unsigned long long);
107-
template <> const char *GetPythonValueFormatString(float t);
108-
template <> const char *GetPythonValueFormatString(double t);
109-
11089
void *LLDBSWIGPython_CastPyObjectToSBData(PyObject *data);
11190
void *LLDBSWIGPython_CastPyObjectToSBError(PyObject *data);
11291
void *LLDBSWIGPython_CastPyObjectToSBValue(PyObject *data);

0 commit comments

Comments
 (0)