aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2013-05-02 23:15:45 +0000
committerDouglas Gregor <dgregor@apple.com>2013-05-02 23:15:45 +0000
commitfa5f03052bc39d9c8f2fa8b4002597a8219760a4 (patch)
tree959f9cebb4a939a426b72fd52f2aa66605c048fc /utils
parent3796d1539a39b999fd50bed7aea726ef6f845e17 (diff)
Revert r180970; it's causing breakage.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@180972 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/ClangAttrEmitter.cpp43
-rw-r--r--utils/TableGen/TableGen.cpp8
-rw-r--r--utils/TableGen/TableGenBackends.h1
3 files changed, 0 insertions, 52 deletions
diff --git a/utils/TableGen/ClangAttrEmitter.cpp b/utils/TableGen/ClangAttrEmitter.cpp
index 36de06e2df..7c8603fc6c 100644
--- a/utils/TableGen/ClangAttrEmitter.cpp
+++ b/utils/TableGen/ClangAttrEmitter.cpp
@@ -971,49 +971,6 @@ void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS) {
OS << "#endif\n";
}
-// Emits the LateParsed property for attributes.
-void EmitClangAttrExprArgsList(RecordKeeper &Records, raw_ostream &OS) {
- emitSourceFileHeader("llvm::StringSwitch code to match attributes with "
- "expression arguments", OS);
-
- std::vector<Record*> Attrs = Records.getAllDerivedDefinitions("Attr");
-
- for (std::vector<Record*>::iterator I = Attrs.begin(), E = Attrs.end();
- I != E; ++I) {
- Record &Attr = **I;
-
- // Determine whether the first argument is something that is always
- // an expression.
- std::vector<Record *> Args = Attr.getValueAsListOfDefs("Args");
- if (Args.empty() || Args[0]->getSuperClasses().empty())
- continue;
-
- // Check whether this is one of the argument kinds that implies an
- // expression.
- // FIXME: Aligned is weird.
- if (!llvm::StringSwitch<bool>(Args[0]->getSuperClasses().back()->getName())
- .Case("AlignedArgument", true)
- .Case("BoolArgument", true)
- .Case("DefaultIntArgument", true)
- .Case("IntArgument", true)
- .Case("StringArgument", true)
- .Case("ExprArgument", true)
- .Case("UnsignedArgument", true)
- .Case("VariadicUnsignedArgument", true)
- .Case("VariadicExprArgument", true)
- .Default(false))
- continue;
-
- std::vector<Record*> Spellings = Attr.getValueAsListOfDefs("Spellings");
-
- for (std::vector<Record*>::const_iterator I = Spellings.begin(),
- E = Spellings.end(); I != E; ++I) {
- OS << ".Case(\"" << (*I)->getValueAsString("Name") << "\", "
- << "true" << ")\n";
- }
- }
-}
-
// Emits the class method definitions for attributes.
void EmitClangAttrImpl(RecordKeeper &Records, raw_ostream &OS) {
emitSourceFileHeader("Attribute classes' member function definitions", OS);
diff --git a/utils/TableGen/TableGen.cpp b/utils/TableGen/TableGen.cpp
index 12e1c47725..3df8940b05 100644
--- a/utils/TableGen/TableGen.cpp
+++ b/utils/TableGen/TableGen.cpp
@@ -24,7 +24,6 @@ using namespace clang;
enum ActionType {
GenClangAttrClasses,
- GenClangAttrExprArgsList,
GenClangAttrImpl,
GenClangAttrList,
GenClangAttrPCHRead,
@@ -63,10 +62,6 @@ namespace {
"Generate option parser implementation"),
clEnumValN(GenClangAttrClasses, "gen-clang-attr-classes",
"Generate clang attribute clases"),
- clEnumValN(GenClangAttrExprArgsList,
- "gen-clang-attr-expr-args-list",
- "Generate a clang attribute expression "
- "arguments list"),
clEnumValN(GenClangAttrImpl, "gen-clang-attr-impl",
"Generate clang attribute implementations"),
clEnumValN(GenClangAttrList, "gen-clang-attr-list",
@@ -148,9 +143,6 @@ bool ClangTableGenMain(raw_ostream &OS, RecordKeeper &Records) {
case GenClangAttrClasses:
EmitClangAttrClass(Records, OS);
break;
- case GenClangAttrExprArgsList:
- EmitClangAttrExprArgsList(Records, OS);
- break;
case GenClangAttrImpl:
EmitClangAttrImpl(Records, OS);
break;
diff --git a/utils/TableGen/TableGenBackends.h b/utils/TableGen/TableGenBackends.h
index 0ff33d775c..03708b6a76 100644
--- a/utils/TableGen/TableGenBackends.h
+++ b/utils/TableGen/TableGenBackends.h
@@ -30,7 +30,6 @@ void EmitClangASTNodes(RecordKeeper &RK, raw_ostream &OS,
const std::string &N, const std::string &S);
void EmitClangAttrClass(RecordKeeper &Records, raw_ostream &OS);
-void EmitClangAttrExprArgsList(RecordKeeper &Records, raw_ostream &OS);
void EmitClangAttrImpl(RecordKeeper &Records, raw_ostream &OS);
void EmitClangAttrList(RecordKeeper &Records, raw_ostream &OS);
void EmitClangAttrPCHRead(RecordKeeper &Records, raw_ostream &OS);