drgn/libdrgn/language.c
Omar Sandoval 4f5249775d Fix various lints
Some functions that could be static found by -Wmissing-prototypes, some
include-what-you-use warnings, some missing SPDX identifiers. These
lints should be automated at some point.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
2022-02-17 10:45:42 -08:00

21 lines
537 B
C

// Copyright (c) Meta Platforms, Inc. and affiliates.
// SPDX-License-Identifier: GPL-3.0-or-later
#include <assert.h>
#include "array.h"
#include "language.h"
#include "util.h"
const struct drgn_language * const drgn_languages[] = {
[DRGN_LANGUAGE_C] = &drgn_language_c,
[DRGN_LANGUAGE_CPP] = &drgn_language_cpp,
};
static_assert(array_size(drgn_languages) == DRGN_NUM_LANGUAGES,
"missing language in drgn_languages");
LIBDRGN_PUBLIC const char *drgn_language_name(const struct drgn_language *lang)
{
return lang->name;
}