summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGDecl.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-06-09 01:20:56 +0000
committerChris Lattner <sabre@nondot.org>2007-06-09 01:20:56 +0000
commit1ad38f8feee93b22e69aa3543a6027445500c521 (patch)
tree93cc14b33125708ecee231db08c8337ade7973a5 /clang/CodeGen/CGDecl.cpp
parent776fac87033d7616f1bfd46c39221688c97b0011 (diff)
downloadbcm5719-llvm-1ad38f8feee93b22e69aa3543a6027445500c521.tar.gz
bcm5719-llvm-1ad38f8feee93b22e69aa3543a6027445500c521.zip
codegen all declarators in a declstmt, allowing us to successfully codegen
stuff like: void test() { int *X, Y, *Z[14]; X[Y] = 4; } llvm-svn: 39624
Diffstat (limited to 'clang/CodeGen/CGDecl.cpp')
-rw-r--r--clang/CodeGen/CGDecl.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/clang/CodeGen/CGDecl.cpp b/clang/CodeGen/CGDecl.cpp
index bc6892dacb6..7bd430d15b8 100644
--- a/clang/CodeGen/CGDecl.cpp
+++ b/clang/CodeGen/CGDecl.cpp
@@ -21,10 +21,9 @@ using namespace clang;
using namespace CodeGen;
-void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
- const Decl *Decl = S.getDecl();
+void CodeGenFunction::EmitDecl(const Decl &D) {
- switch (Decl->getKind()) {
+ switch (D.getKind()) {
default: assert(0 && "Unknown decl kind!");
case Decl::FileVariable:
assert(0 && "Should not see file-scope variables inside a function!");
@@ -40,9 +39,9 @@ void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
return;
case Decl::BlockVariable:
- return EmitBlockVarDecl(cast<BlockVarDecl>(*Decl));
+ return EmitBlockVarDecl(cast<BlockVarDecl>(D));
case Decl::EnumConstant:
- return EmitEnumConstantDecl(cast<EnumConstantDecl>(*Decl));
+ return EmitEnumConstantDecl(cast<EnumConstantDecl>(D));
}
}
OpenPOWER on IntegriCloud