diff options
Diffstat (limited to 'contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp')
-rw-r--r-- | contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp b/contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp new file mode 100644 index 000000000000..df7e3d63a6c3 --- /dev/null +++ b/contrib/llvm-project/clang/lib/AST/AttrDocTable.cpp @@ -0,0 +1,27 @@ +//===--- AttrDocTable.cpp - implements Attr::getDocumentation() -*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception +// +//===----------------------------------------------------------------------===// +// +// This file contains out-of-line methods for Attr classes. +// +//===----------------------------------------------------------------------===// + +#include "clang/AST/Attr.h" +#include "llvm/ADT/StringRef.h" + +#include "AttrDocTable.inc" + +static const llvm::StringRef AttrDoc[] = { +#define ATTR(NAME) AttrDoc_##NAME, +#include "clang/Basic/AttrList.inc" +}; + +llvm::StringRef clang::Attr::getDocumentation(clang::attr::Kind K) { + if (K < std::size(AttrDoc)) + return AttrDoc[K]; + return ""; +} |