forked from OSchip/llvm-project
Use predicate function to simplify a bit.
llvm-svn: 208312
This commit is contained in:
parent
cdbbe08b05
commit
c47b0a1b99
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue