about summary refs log tree commit diff stats
path: root/wrapperhelper/src/machine.h
diff options
context:
space:
mode:
Diffstat (limited to 'wrapperhelper/src/machine.h')
-rw-r--r--wrapperhelper/src/machine.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/wrapperhelper/src/machine.h b/wrapperhelper/src/machine.h
new file mode 100644
index 00000000..0f850fef
--- /dev/null
+++ b/wrapperhelper/src/machine.h
@@ -0,0 +1,33 @@
+#pragma once
+
+#ifndef MACHINE_H
+#define MACHINE_H
+
+#include "cstring.h"
+#include "khash.h"
+#include "vector.h"
+
+struct macro_s; // preproc_private.h
+
+typedef struct machine_s {
+	// Preprocessor
+	size_t npaths;
+	char **include_path;
+	
+	size_t npredefs;
+	char **predef_macros_name;
+	struct macro_s **predef_macros;
+	
+	// Parsing
+	size_t size_long;
+	// TODO: also have info on unnamed bitfields, etc
+} machine_t;
+
+extern machine_t machine_x86_64;
+// extern machine_t machine_x86;
+// extern machine_t machine_arm64;
+
+int init_machines(size_t npaths, const char *const *extra_include_path);
+void del_machines(void);
+
+#endif // MACHINE_H