118991120SNico Weber //===--- AttrDocTable.cpp - implements Attr::getDocumentation() -*- C++ -*-===// 218991120SNico Weber // 318991120SNico Weber // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 418991120SNico Weber // See https://llvm.org/LICENSE.txt for license information. 518991120SNico Weber // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 618991120SNico Weber // 718991120SNico Weber //===----------------------------------------------------------------------===// 818991120SNico Weber // 918991120SNico Weber // This file contains out-of-line methods for Attr classes. 1018991120SNico Weber // 1118991120SNico Weber //===----------------------------------------------------------------------===// 1218991120SNico Weber 1318991120SNico Weber #include "clang/AST/Attr.h" 1418991120SNico Weber #include "llvm/ADT/StringRef.h" 1518991120SNico Weber 1618991120SNico Weber #include "AttrDocTable.inc" 1718991120SNico Weber 1818991120SNico Weber static const llvm::StringRef AttrDoc[] = { 1918991120SNico Weber #define ATTR(NAME) AttrDoc_##NAME, 2018991120SNico Weber #include "clang/Basic/AttrList.inc" 2118991120SNico Weber }; 2218991120SNico Weber getDocumentation(clang::attr::Kind K)2318991120SNico Weberllvm::StringRef clang::Attr::getDocumentation(clang::attr::Kind K) { 24*ee15e2bdSAlexandre Ganea if (K < (int)std::size(AttrDoc)) 2518991120SNico Weber return AttrDoc[K]; 2618991120SNico Weber return ""; 2718991120SNico Weber } 28