summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CGStmt.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/CGStmt.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/CGStmt.cpp')
-rw-r--r--clang/CodeGen/CGStmt.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/clang/CodeGen/CGStmt.cpp b/clang/CodeGen/CGStmt.cpp
index 0992c1dc47f..549b962181c 100644
--- a/clang/CodeGen/CGStmt.cpp
+++ b/clang/CodeGen/CGStmt.cpp
@@ -271,3 +271,7 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) {
EmitBlock(new BasicBlock());
}
+void CodeGenFunction::EmitDeclStmt(const DeclStmt &S) {
+ for (const Decl *Decl = S.getDecl(); Decl; Decl = Decl->getNextDeclarator())
+ EmitDecl(*Decl);
+} \ No newline at end of file
OpenPOWER on IntegriCloud