summaryrefslogtreecommitdiffstats
path: root/tools/frr-llvm-debuginfo.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/frr-llvm-debuginfo.h')
-rw-r--r--tools/frr-llvm-debuginfo.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/tools/frr-llvm-debuginfo.h b/tools/frr-llvm-debuginfo.h
new file mode 100644
index 0000000..4d2985c
--- /dev/null
+++ b/tools/frr-llvm-debuginfo.h
@@ -0,0 +1,24 @@
+// SPDX-License-Identifier: Unlicense
+
+#ifndef _FRR_LLVM_DEBUGINFO_H
+#define _FRR_LLVM_DEBUGINFO_H
+
+#include <stdbool.h>
+#include <llvm-c/Core.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+struct dbginfo;
+
+extern struct dbginfo *dbginfo_load(LLVMModuleRef mod);
+extern bool dbginfo_struct_member(struct dbginfo *di, LLVMTypeRef typ,
+ unsigned long long idx, char **struct_name,
+ char **member_name);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FRR_LLVM_DEBUGINFO_H */