From: Daniel Dunbar Date: Fri, 13 Feb 2009 22:49:13 +0000 (+0000) Subject: Simplify predicate. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7542bca16b63c84e401b44b586ac3378aed446c5;p=clang Simplify predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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; }