summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorSteve Naroff <snaroff@apple.com>2008-04-15 22:42:06 +0000
committerSteve Naroff <snaroff@apple.com>2008-04-15 22:42:06 +0000
commit08899ff85dde961d36bf0c94d07ee3418905d536 (patch)
treef62f9495dbc4863310a91c87b36f3a17446beb8d /clang/lib/CodeGen/CodeGenModule.cpp
parent82b6673c44ee0153c5f252f38b95cb21396cc0b2 (diff)
downloadbcm5719-llvm-08899ff85dde961d36bf0c94d07ee3418905d536.tar.gz
bcm5719-llvm-08899ff85dde961d36bf0c94d07ee3418905d536.zip
Remove FileVarDecl and BlockVarDecl. They are replaced by VarDecl::isBlockVarDecl() and VarDecl::isFileVarDecl().
This is a fairly mechanical/large change. As a result, I avoided making any changes/simplifications that weren't directly related. I did break two Analysis tests. I also have a couple FIXME's in UninitializedValues.cpp. Ted, can you take a look? If the bug isn't obvious, I am happy to dig in and fix it (since I broke it). llvm-svn: 49748
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index 83f661f012a..cb34fb5a731 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -288,7 +288,7 @@ llvm::Constant *CodeGenModule::EmitGlobalInit(const Expr *Expr) {
return EmitConstantExpr(Expr);
}
-void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) {
+void CodeGenModule::EmitGlobalVar(const VarDecl *D) {
// If this is just a forward declaration of the variable, don't emit it now,
// allow it to be emitted lazily on its first use.
if (D->getStorageClass() == VarDecl::Extern && D->getInit() == 0)
@@ -352,9 +352,10 @@ void CodeGenModule::EmitGlobalVar(const FileVarDecl *D) {
/// 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);
+void CodeGenModule::EmitGlobalVarDeclarator(const VarDecl *D) {
+ for (; D; D = cast_or_null<VarDecl>(D->getNextDeclarator()))
+ if (D->isFileVarDecl())
+ EmitGlobalVar(D);
}
void CodeGenModule::UpdateCompletedType(const TagDecl *TD) {
OpenPOWER on IntegriCloud