From 35db2b3d4c89343171a52963518b03880432de0c Mon Sep 17 00:00:00 2001 From: Aaron Ballman Date: Wed, 29 Jan 2014 22:13:45 +0000 Subject: Consolidating several table-generated files containing parser-related string switches into a single file. This reduces build-related complexity by replacing four separate projects (and table-gen instantiations) with a single one. No functional changes intended. llvm-svn: 200424 --- clang/lib/Parse/ParseDecl.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'clang/lib/Parse/ParseDecl.cpp') diff --git a/clang/lib/Parse/ParseDecl.cpp b/clang/lib/Parse/ParseDecl.cpp index c295c766065..0950ab09b76 100644 --- a/clang/lib/Parse/ParseDecl.cpp +++ b/clang/lib/Parse/ParseDecl.cpp @@ -69,9 +69,11 @@ TypeResult Parser::ParseTypeName(SourceRange *Range, /// isAttributeLateParsed - Return true if the attribute has arguments that /// require late parsing. static bool isAttributeLateParsed(const IdentifierInfo &II) { +#define CLANG_ATTR_LATE_PARSED_LIST return llvm::StringSwitch(II.getName()) -#include "clang/Parse/AttrLateParsed.inc" +#include "clang/Parse/AttrParserStringSwitches.inc" .Default(false); +#undef CLANG_ATTR_LATE_PARSED_LIST } /// ParseGNUAttributes - Parse a non-empty attributes list. @@ -196,24 +198,30 @@ static StringRef normalizeAttrName(StringRef Name) { /// \brief Determine whether the given attribute has an identifier argument. static bool attributeHasIdentifierArg(const IdentifierInfo &II) { +#define CLANG_ATTR_IDENTIFIER_ARG_LIST return llvm::StringSwitch(normalizeAttrName(II.getName())) -#include "clang/Parse/AttrIdentifierArg.inc" +#include "clang/Parse/AttrParserStringSwitches.inc" .Default(false); +#undef CLANG_ATTR_IDENTIFIER_ARG_LIST } /// \brief Determine whether the given attribute parses a type argument. static bool attributeIsTypeArgAttr(const IdentifierInfo &II) { +#define CLANG_ATTR_TYPE_ARG_LIST return llvm::StringSwitch(normalizeAttrName(II.getName())) -#include "clang/Parse/AttrTypeArg.inc" +#include "clang/Parse/AttrParserStringSwitches.inc" .Default(false); +#undef CLANG_ATTR_TYPE_ARG_LIST } /// \brief Determine whether the given attribute requires parsing its arguments /// in an unevaluated context or not. static bool attributeParsedArgsUnevaluated(const IdentifierInfo &II) { +#define CLANG_ATTR_ARG_CONTEXT_LIST return llvm::StringSwitch(normalizeAttrName(II.getName())) -#include "clang/Parse/AttrArgContext.inc" +#include "clang/Parse/AttrParserStringSwitches.inc" .Default(false); +#undef CLANG_ATTR_ARG_CONTEXT_LIST } IdentifierLoc *Parser::ParseIdentifierLoc() { -- cgit v1.2.3