From bd78cfa0480df14a627b536b628532070b6632c9 Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Fri, 27 Apr 2012 21:39:49 +0000 Subject: [PATCH] modern objective-c translator: _OBJC_PROTOCOL_REFERENCE_* symbols should be static. // rdar://11337074 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@155736 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Rewrite/RewriteModernObjC.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Rewrite/RewriteModernObjC.cpp b/lib/Rewrite/RewriteModernObjC.cpp index 041bd60aa3..3b18e5df9f 100644 --- a/lib/Rewrite/RewriteModernObjC.cpp +++ b/lib/Rewrite/RewriteModernObjC.cpp @@ -5538,7 +5538,7 @@ static void Write_ProtocolExprReferencedMetadata(ASTContext *Context, std::string &Result) { // Also output .objc_protorefs$B section and its meta-data. if (Context->getLangOpts().MicrosoftExt) - Result += "__declspec(allocate(\".objc_protorefs$B\")) "; + Result += "static "; Result += "struct _protocol_t *"; Result += "_OBJC_PROTOCOL_REFERENCE_$_"; Result += PDecl->getNameAsString(); @@ -5628,7 +5628,6 @@ void RewriteModernObjC::Initialize(ASTContext &context) { Preamble += "#pragma section(\".objc_imageinfo$B\", long, read, write)\n"; Preamble += "#pragma section(\".objc_nlclslist$B\", long, read, write)\n"; Preamble += "#pragma section(\".objc_nlcatlist$B\", long, read, write)\n"; - Preamble += "#pragma section(\".objc_protorefs$B\", long, read, write)\n"; // These are generated but not necessary for functionality. Preamble += "#pragma section(\".cat_cls_meth$B\", long, read, write)\n"; Preamble += "#pragma section(\".inst_meth$B\", long, read, write)\n"; -- 2.50.1