From c78b67d6c5a56d39765a648b717b3fff4712285b Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 27 Mar 2014 00:02:45 +0000 Subject: [PATCH] Don't produce a L symbol in __DATA,__data. The section __DATA,__data is atomized by the linker and cannot have L symbols. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@204879 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGObjCMac.cpp | 2 +- test/CodeGenObjC/metadata-symbols-32.m | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/CGObjCMac.cpp b/lib/CodeGen/CGObjCMac.cpp index a1d9f18154..10199c8dfc 100644 --- a/lib/CodeGen/CGObjCMac.cpp +++ b/lib/CodeGen/CGObjCMac.cpp @@ -2718,7 +2718,7 @@ CGObjCMac::EmitProtocolExtension(const ObjCProtocolDecl *PD, llvm::ConstantStruct::get(ObjCTypes.ProtocolExtensionTy, Values); // No special section, but goes in llvm.used - return CreateMetadataVar("\01L_OBJC_PROTOCOLEXT_" + PD->getName(), + return CreateMetadataVar("\01l_OBJC_PROTOCOLEXT_" + PD->getName(), Init, 0, 0, true); } diff --git a/test/CodeGenObjC/metadata-symbols-32.m b/test/CodeGenObjC/metadata-symbols-32.m index 07515cfe36..61279e1dbe 100644 --- a/test/CodeGenObjC/metadata-symbols-32.m +++ b/test/CodeGenObjC/metadata-symbols-32.m @@ -4,6 +4,8 @@ // CHECK: @"\01L_OBJC_METH_VAR_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1 // CHECK: @"\01L_OBJC_METH_VAR_TYPE_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1 +// CHECK: @"\01l_OBJC_PROTOCOLEXT_P" = private global +// CHECK-NOT: section // CHECK: @"\01L_OBJC_CLASS_NAME_{{[0-9]*}}" = private global {{.*}}section "__TEXT,__cstring,cstring_literals", align 1 // CHECK: @"\01L_OBJC_PROTOCOL_INSTANCE_METHODS_P" = private global {{.*}}section "__OBJC,__cat_inst_meth,regular,no_dead_strip", align 4 // CHECK: @"\01L_OBJC_PROTOCOL_CLASS_METHODS_P" = private global {{.*}}section "__OBJC,__cat_cls_meth,regular,no_dead_strip", align 4 -- 2.40.0