From 5db3ef6fbbb8135dc4d083742c1c49955ef2a6d2 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 13 Feb 2009 22:49:13 +0000 Subject: [PATCH] Simplify predicate. llvm-svn: 64500 --- clang/lib/CodeGen/CodeGenModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/clang/lib/CodeGen/CodeGenModule.cpp b/clang/lib/CodeGen/CodeGenModule.cpp index e60edce213b4..503cc2ace56e 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; }