14226f635SJason King /*
24226f635SJason King  * This file and its contents are supplied under the terms of the
34226f635SJason King  * Common Development and Distribution License ("CDDL"), version 1.0.
44226f635SJason King  * You may only use this file in accordance with the terms of version
54226f635SJason King  * 1.0 of the CDDL.
64226f635SJason King  *
74226f635SJason King  * A full copy of the text of the CDDL should have accompanied this
84226f635SJason King  * source.  A copy of the CDDL is also available via the Internet at
94226f635SJason King  * http://www.illumos.org/license/CDDL.
104226f635SJason King  */
114226f635SJason King 
124226f635SJason King /*
134226f635SJason King  * Copyright 2017 Jason King
14d52aae23SJason King  * Copyright 2019 Joyent, Inc.
154226f635SJason King  */
164226f635SJason King 
174226f635SJason King #ifndef _DEMANGLE_SYS_H
184226f635SJason King #define	_DEMANGLE_SYS_H
194226f635SJason King 
204226f635SJason King #include <sys/types.h>
214226f635SJason King 
224226f635SJason King #ifdef __cplusplus
234226f635SJason King extern "C" {
244226f635SJason King #endif
254226f635SJason King 
264226f635SJason King typedef enum sysdem_lang_e {
274226f635SJason King 	SYSDEM_LANG_AUTO,
286a6cfa5dSJason King 	SYSDEM_LANG_CPP,
29*1cd08393SJason King 	SYSDEM_LANG_RUST,
304226f635SJason King } sysdem_lang_t;
314226f635SJason King 
324226f635SJason King typedef struct sysdem_alloc_s {
334226f635SJason King 	void *(*alloc)(size_t);
344226f635SJason King 	void (*free)(void *, size_t);
354226f635SJason King } sysdem_ops_t;
364226f635SJason King 
37d52aae23SJason King boolean_t sysdem_parse_lang(const char *, sysdem_lang_t *);
384226f635SJason King char *sysdemangle(const char *, sysdem_lang_t, sysdem_ops_t *);
394226f635SJason King 
404226f635SJason King #ifdef __cplusplus
414226f635SJason King }
424226f635SJason King #endif
434226f635SJason King 
444226f635SJason King #endif /* _DEMANGLE_SYS_H */