summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-13 22:49:13 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-13 22:49:13 +0000
commit5db3ef6fbbb8135dc4d083742c1c49955ef2a6d2 (patch)
treeddd00c7fff5090a31f58312c7f9ab05932dbf90a /clang/lib/CodeGen/CodeGenModule.cpp
parent311bf2916be85a0eb5fe3e89ee074c20c98abab0 (diff)
downloadbcm5719-llvm-5db3ef6fbbb8135dc4d083742c1c49955ef2a6d2.tar.gz
bcm5719-llvm-5db3ef6fbbb8135dc4d083742c1c49955ef2a6d2.zip
Simplify predicate.
llvm-svn: 64500
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--clang/lib/CodeGen/CodeGenModule.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp
index e60edce213b..503cc2ace56 100644
--- a/clang/lib/CodeGen/CodeGenModule.cpp
+++ b/clang/lib/CodeGen/CodeGenModule.cpp
@@ -542,9 +542,7 @@ void CodeGenModule::EmitGlobal(const ValueDecl *Global) {
assert(VD->isFileVarDecl() && "Cannot emit local var decl as global.");
// Forward declarations are emitted lazily on first use.
- if ((VD->getStorageClass() == VarDecl::Extern ||
- VD->getStorageClass() == VarDecl::PrivateExtern) &&
- VD->getInit() == 0)
+ if (!VD->getInit() && VD->hasExternalStorage())
return;
}
OpenPOWER on IntegriCloud