[cfe-commits] r39848 - in /cfe/trunk/CodeGen: CodeGenModule.cpp CodeGenModule.h ModuleBuilder.cpp
Chris Lattner
sabre at nondot.org
Fri Jul 13 17:16:50 PDT 2007
Author: lattner
Date: Fri Jul 13 19:16:50 2007
New Revision: 39848
URL: http://llvm.org/viewvc/llvm-project?rev=39848&view=rev
Log:
In "int X,Y;", compile both X and Y.
Modified:
cfe/trunk/CodeGen/CodeGenModule.cpp
cfe/trunk/CodeGen/CodeGenModule.h
cfe/trunk/CodeGen/ModuleBuilder.cpp
Modified: cfe/trunk/CodeGen/CodeGenModule.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenModule.cpp?rev=39848&r1=39847&r2=39848&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CodeGenModule.cpp (original)
+++ cfe/trunk/CodeGen/CodeGenModule.cpp Fri Jul 13 19:16:50 2007
@@ -88,6 +88,12 @@
}
}
+/// EmitGlobalVarDeclarator - Emit all the global vars attached to the specified
+/// declarator chain.
+void CodeGenModule::EmitGlobalVarDeclarator(const FileVarDecl *D) {
+ for (; D; D = cast_or_null<FileVarDecl>(D->getNextDeclarator()))
+ EmitGlobalVar(D);
+}
llvm::Function *CodeGenModule::getMemCpyFn() {
if (MemCpyFn) return MemCpyFn;
Modified: cfe/trunk/CodeGen/CodeGenModule.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/CodeGenModule.h?rev=39848&r1=39847&r2=39848&view=diff
==============================================================================
--- cfe/trunk/CodeGen/CodeGenModule.h (original)
+++ cfe/trunk/CodeGen/CodeGenModule.h Fri Jul 13 19:16:50 2007
@@ -53,6 +53,7 @@
void EmitFunction(const FunctionDecl *FD);
void EmitGlobalVar(const FileVarDecl *D);
+ void EmitGlobalVarDeclarator(const FileVarDecl *D);
void PrintStats() {}
};
Modified: cfe/trunk/CodeGen/ModuleBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/CodeGen/ModuleBuilder.cpp?rev=39848&r1=39847&r2=39848&view=diff
==============================================================================
--- cfe/trunk/CodeGen/ModuleBuilder.cpp (original)
+++ cfe/trunk/CodeGen/ModuleBuilder.cpp Fri Jul 13 19:16:50 2007
@@ -34,7 +34,7 @@
/// CodeGenGlobalVar - Emit the specified global variable to LLVM.
void clang::CodeGen::CodeGenGlobalVar(BuilderTy *Builder, FileVarDecl *D) {
- static_cast<CodeGenModule*>(Builder)->EmitGlobalVar(D);
+ static_cast<CodeGenModule*>(Builder)->EmitGlobalVarDeclarator(D);
}
More information about the cfe-commits
mailing list