forked from OSchip/llvm-project
9a14adeae0
The LLDBSWIGPython functions had (at least) two problems: - There wasn't a single source of truth (a header file) for the prototypes of these functions. This meant that subtle differences in copies of function declarations could go by undetected. And not-so-subtle differences would result in strange runtime failures. - All of the declarations had to have an extern "C" interface, because the function definitions were being placed inside and extert "C" block generated by swig. This patch fixes both problems by moving the function definitions to the %header block of the swig files. This block is not surrounded by extern "C", and seems more appropriate anyway, as swig docs say it is meant for "user-defined support code" (whereas the previous %wrapper code was for automatically-generated wrappers). It also puts the declarations into the SWIGPythonBridge header file (which seems to have been created for this purpose), and ensures it is included by all code wishing to define or use these functions. This means that any differences in the declaration become a compiler error instead of a runtime failure. Differential Revision: https://reviews.llvm.org/D114369 |
||
---|---|---|
.. | ||
API | ||
Breakpoint | ||
Core | ||
DataFormatter | ||
Disassembler | ||
Editline | ||
Expression | ||
Host | ||
Instruction | ||
Interpreter | ||
Language | ||
ObjectFile | ||
Platform | ||
Process | ||
ScriptInterpreter | ||
Signals | ||
Symbol | ||
SymbolFile | ||
Target | ||
TestingSupport | ||
Thread | ||
UnwindAssembly | ||
Utility | ||
debugserver | ||
tools | ||
CMakeLists.txt | ||
gtest_common.h |