From 2d4fcb889809ede7c322081a15b4b088231589ff Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 8 May 2014 13:07:37 +0000 Subject: [PATCH] Use predicate function to simplify a bit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@208312 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGBlocks.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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); } -- 2.40.0