aboutsummaryrefslogtreecommitdiff
path: root/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
commit7542bca16b63c84e401b44b586ac3378aed446c5 (patch)
tree49abbcc2d2147af77feff4aeb5237dbbd2daa8eb /lib/CodeGen/CodeGenModule.cpp
parent186204bfcf9c53d48143ec300d4c3d036fed4140 (diff)
Simplify predicate.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenModule.cpp')
-rw-r--r--lib/CodeGen/CodeGenModule.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/CodeGen/CodeGenModule.cpp b/lib/CodeGen/CodeGenModule.cpp
index e60edce213..503cc2ace5 100644
--- a/lib/CodeGen/CodeGenModule.cpp
+++ b/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;
}