From 7542bca16b63c84e401b44b586ac3378aed446c5 Mon Sep 17 00:00:00 2001 From: Daniel Dunbar Date: Fri, 13 Feb 2009 22:49:13 +0000 Subject: [PATCH] Simplify predicate. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CodeGenModule.cpp | 4 +--- 1 file changed, 1 insertion(+), 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; } -- 2.40.0