]> granicus.if.org Git - clang/commitdiff
Simplify predicate.
authorDaniel Dunbar <daniel@zuster.org>
Fri, 13 Feb 2009 22:49:13 +0000 (22:49 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 13 Feb 2009 22:49:13 +0000 (22:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@64500 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/CodeGenModule.cpp

index e60edce213b4d56183bff02236aa00e2c5e56ab0..503cc2ace56ef31255b437c1cd01465dd4370e0d 100644 (file)
@@ -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;
   }