diff options
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index 132314ad2dc..663f1d03fdc 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -2586,11 +2586,11 @@ static void configureBlocksRuntimeObject(CodeGenModule &CGM, } } - if (!CGM.getLangOpts().BlocksRuntimeOptional) - return; - - if (GV->isDeclaration() && GV->hasExternalLinkage()) + if (CGM.getLangOpts().BlocksRuntimeOptional && GV->isDeclaration() && + GV->hasExternalLinkage()) GV->setLinkage(llvm::GlobalValue::ExternalWeakLinkage); + + CGM.setDSOLocal(GV); } llvm::Constant *CodeGenModule::getBlockObjectDispose() { |