summaryrefslogtreecommitdiffstats
path: root/clang/lib
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2008-11-14 12:46:07 +0000
committerDouglas Gregor <dgregor@apple.com>2008-11-14 12:46:07 +0000
commitbe35ce953efafdc0975ac18b8048471ca9ce1878 (patch)
tree65c3b37331435a10fe244e2a747b3a7d7da34f03 /clang/lib
parentd16b37efae97b15d85513568597b942c8720b268 (diff)
downloadbcm5719-llvm-be35ce953efafdc0975ac18b8048471ca9ce1878.tar.gz
bcm5719-llvm-be35ce953efafdc0975ac18b8048471ca9ce1878.zip
Don't require us to manually number the statements and expressions in StmtNodes.def. We don't need stable numbers yet, renumbering is a pain, and LAST_STMT had the wrong value anyway.
llvm-svn: 59300
Diffstat (limited to 'clang/lib')
-rw-r--r--clang/lib/AST/Stmt.cpp6
-rw-r--r--clang/lib/AST/StmtPrinter.cpp2
2 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/AST/Stmt.cpp b/clang/lib/AST/Stmt.cpp
index 9c06807b3b9..2308159f5d5 100644
--- a/clang/lib/AST/Stmt.cpp
+++ b/clang/lib/AST/Stmt.cpp
@@ -29,9 +29,9 @@ static StmtClassNameTable &getStmtInfoTableEntry(Stmt::StmtClass E) {
// Intialize the table on the first use.
Initialized = true;
-#define STMT(N, CLASS, PARENT) \
- StmtClassInfo[N].Name = #CLASS; \
- StmtClassInfo[N].Size = sizeof(CLASS);
+#define STMT(CLASS, PARENT) \
+ StmtClassInfo[(unsigned)Stmt::CLASS##Class].Name = #CLASS; \
+ StmtClassInfo[(unsigned)Stmt::CLASS##Class].Size = sizeof(CLASS);
#include "clang/AST/StmtNodes.def"
return StmtClassInfo[E];
diff --git a/clang/lib/AST/StmtPrinter.cpp b/clang/lib/AST/StmtPrinter.cpp
index 7529eec9847..bbd53d0d494 100644
--- a/clang/lib/AST/StmtPrinter.cpp
+++ b/clang/lib/AST/StmtPrinter.cpp
@@ -76,7 +76,7 @@ namespace {
}
void VisitStmt(Stmt *Node);
-#define STMT(N, CLASS, PARENT) \
+#define STMT(CLASS, PARENT) \
void Visit##CLASS(CLASS *Node);
#include "clang/AST/StmtNodes.def"
};
OpenPOWER on IntegriCloud