2021-11-21 23:59:44 +00:00
|
|
|
// Copyright (c) Meta Platforms, Inc. and affiliates.
|
2022-11-02 00:05:16 +00:00
|
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
2020-02-21 22:55:52 +00:00
|
|
|
|
2022-02-17 18:45:42 +00:00
|
|
|
#include <assert.h>
|
|
|
|
|
2022-02-16 20:43:36 +00:00
|
|
|
#include "array.h"
|
2020-02-21 22:55:52 +00:00
|
|
|
#include "language.h"
|
2022-02-17 18:45:42 +00:00
|
|
|
#include "util.h"
|
2020-02-21 22:55:52 +00:00
|
|
|
|
2022-02-16 20:43:36 +00:00
|
|
|
const struct drgn_language * const drgn_languages[] = {
|
|
|
|
[DRGN_LANGUAGE_C] = &drgn_language_c,
|
|
|
|
[DRGN_LANGUAGE_CPP] = &drgn_language_cpp,
|
2020-02-21 22:55:52 +00:00
|
|
|
};
|
2022-02-16 20:43:36 +00:00
|
|
|
static_assert(array_size(drgn_languages) == DRGN_NUM_LANGUAGES,
|
|
|
|
"missing language in drgn_languages");
|
2022-02-16 21:05:28 +00:00
|
|
|
|
|
|
|
LIBDRGN_PUBLIC const char *drgn_language_name(const struct drgn_language *lang)
|
|
|
|
{
|
|
|
|
return lang->name;
|
|
|
|
}
|