From: Rafael Espindola Date: Thu, 8 May 2014 13:07:37 +0000 (+0000) Subject: Use predicate function to simplify a bit. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2d4fcb889809ede7c322081a15b4b088231589ff;p=clang Use predicate function to simplify a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208312 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp index 18cfe49bc3..165f7eac2a 100644 --- a/lib/CodeGen/CGBlocks.cpp +++ b/lib/CodeGen/CGBlocks.cpp @@ -2232,8 +2232,7 @@ static void configureBlocksRuntimeObject(CodeGenModule &CGM, if (!CGM.getLangOpts().BlocksRuntimeOptional) return; llvm::GlobalValue *GV = cast(C->stripPointerCasts()); - if (GV->isDeclaration() && - GV->getLinkage() == llvm::GlobalValue::ExternalLinkage) + if (GV->isDeclaration() && GV->hasExternalLinkage()) GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); }