Use predicate function to simplify a bit.

llvm-svn: 208312
This commit is contained in:
Rafael Espindola 2014-05-08 13:07:37 +00:00
parent cdbbe08b05
commit c47b0a1b99
1 changed files with 1 additions and 2 deletions

View File

@ -2232,8 +2232,7 @@ static void configureBlocksRuntimeObject(CodeGenModule &CGM,
if (!CGM.getLangOpts().BlocksRuntimeOptional) return;
llvm::GlobalValue *GV = cast<llvm::GlobalValue>(C->stripPointerCasts());
if (GV->isDeclaration() &&
GV->getLinkage() == llvm::GlobalValue::ExternalLinkage)
if (GV->isDeclaration() && GV->hasExternalLinkage())
GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage);
}