|
@@ -1434,10 +1434,12 @@ static llvm::Constant *buildGlobalBlock(CodeGenModule &CGM,
|
|
if (CGM.getContext().getLangOpts().OpenCL)
|
|
if (CGM.getContext().getLangOpts().OpenCL)
|
|
AddrSpace = CGM.getContext().getTargetAddressSpace(LangAS::opencl_global);
|
|
AddrSpace = CGM.getContext().getTargetAddressSpace(LangAS::opencl_global);
|
|
|
|
|
|
- llvm::Constant *literal = fields.finishAndCreateGlobal(
|
|
|
|
|
|
+ llvm::GlobalVariable *literal = fields.finishAndCreateGlobal(
|
|
"__block_literal_global", blockInfo.BlockAlign,
|
|
"__block_literal_global", blockInfo.BlockAlign,
|
|
/*constant*/ !IsWindows, llvm::GlobalVariable::InternalLinkage, AddrSpace);
|
|
/*constant*/ !IsWindows, llvm::GlobalVariable::InternalLinkage, AddrSpace);
|
|
|
|
|
|
|
|
+ literal->addAttribute("objc_arc_inert");
|
|
|
|
+
|
|
// Windows does not allow globals to be initialised to point to globals in
|
|
// Windows does not allow globals to be initialised to point to globals in
|
|
// different DLLs. Any such variables must run code to initialise them.
|
|
// different DLLs. Any such variables must run code to initialise them.
|
|
if (IsWindows) {
|
|
if (IsWindows) {
|